Finding the optimal building to place a police car.

Slides:



Advertisements
Similar presentations
Unit-iv.
Advertisements

Cross Platform UI testing using Sikuli
Advanced Algorithm Design and Analysis Jiaheng Lu Renmin University of China
Lecture 5: Network Flow Algorithms Max-Flow Min-Cut Single-Source Shortest-Path (SSSP) Job Sequencing.
Chapter 4 The Greedy Approach. Minimum Spanning Tree A tree is an acyclic, connected, undirected graph. A spanning tree for a given graph G=, where E.
© DEEDS 2008Graph Algorithms1 Remarks on Dijkstra  Determining the minimum marginal element (code line: v = the vertex in M 2 with minimum v.L; ) accounts.
The Shortest Path Problem. Shortest-Path Algorithms Find the “shortest” path from point A to point B “Shortest” in time, distance, cost, … Numerous.
TORQUE 3D Daniel Casadevall-Pino
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
CSC 2300 Data Structures & Algorithms April 17, 2007 Chapter 9. Graph Algorithms.
Shortest Path Problems Directed weighted graph. Path length is sum of weights of edges on path. The vertex at which the path begins is the source vertex.
1 Advanced Algorithms All-pairs SPs DP algorithm Floyd-Warshall alg.
Tirgul 13. Unweighted Graphs Wishful Thinking – you decide to go to work on your sun-tan in ‘ Hatzuk ’ beach in Tel-Aviv. Therefore, you take your swimming.
On the Task Assignment Problem : Two New Efficient Heuristic Algorithms.
The Shortest Path Problem
MOBILE APP DEVELOPMENT Presented by Md. Zakaria Chowdhury CEO, Webcraft Bangladesh Director, Sylhet IT Academy.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Graph Algorithms: Minimum.
Using Dijkstra’s Algorithm to Find a Shortest Path from a to z 1.
L21: “Irregular” Graph Algorithms November 11, 2010.
CS223 Advanced Data Structures and Algorithms 1 The Bellman-Ford Shortest Path Algorithm Neil Tang 03/11/2010.
SPANNING TREES Lecture 21 CS2110 – Spring
Dr. Naveed Ahmad Assistant Professor Department of Computer Science University of Peshawar.
COSC 2007 Data Structures II Chapter 14 Graphs III.
Representing and Using Graphs
Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we can find a path that goes over all.
Shortest Path Problem Weight of the graph –Nonnegative real number assigned to the edges connecting to vertices Weighted graphs –When a graph.
The problem of the shortest path The classic Dijkstra algorithm solution to this problem The adaptation of this solution to the problem of robot motion.
Shortest Path Problems Dijkstra’s Algorithm. Introduction Many problems can be modeled using graphs with weights assigned to their edges: Airline flight.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
Graphs A graphs is an abstract representation of a set of objects, called vertices or nodes, where some pairs of the objects are connected by links, called.
SPANNING TREES Lecture 21 CS2110 – Fall Nate Foster is out of town. NO 3-4pm office hours today!
Lecture 19 Minimal Spanning Trees CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
CSE 421 Algorithms Richard Anderson Lecture 8 Optimal Caching Dijkstra’s algorithm.
Spanning Trees Dijkstra (Unit 10) SOL: DM.2 Classwork worksheet Homework (day 70) Worksheet Quiz next block.
Best 5 Mobile App Development Tools for Developer's to think beyond the Limitation.
Graphs 1 Neil Ghani University of Strathclyde. Where are we …. We studied lists: * Searching and sorting a list Then we studied trees: * Efficient search.
Intro of UNITY (for beginner)
Data Structures and Algorithms
Weighted Graphs and traveling Salesperson problem
Minimum Spanning Trees
Shortest Path Problems
Network Flow Problems – Shortest Path Problem
SINGLE-SOURCE SHORTEST PATHS IN DAGs
Unweighted Shortest Path Neil Tang 3/11/2010
The Taxi Scheduling Problem
Greedy Method     Greedy Matching     Coin Changing     Minimum Spanning Tree     Fractional Knapsack     Dijkstra's Single-Source Shortest-Path.
Minimum Spanning Trees
Autumn 2016 Lecture 9 Dijkstra’s algorithm
Shortest Path.
Autumn 2015 Lecture 9 Dijkstra’s algorithm
Shortest-Paths Trees Kun-Mao Chao (趙坤茂)
Intro of UNITY (for beginner)
Richard Anderson Lecture 9 Dijkstra’s algorithm
Dijkstra’s Shortest Path Algorithm Neil Tang 03/25/2008
Shortest Path Problems
Floyd’s Algorithm (shortest-path problem)
Chapter 15 Graphs © 2006 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Route Inspection Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we introduce a vertex.
Troposphere (sic) Fliers
The Bellman-Ford Shortest Path Algorithm Neil Tang 03/27/2008
Weighted Graphs & Shortest Paths
Dijkstra’s Shortest Path Algorithm Neil Tang 3/2/2010
Informed Search Idea: be smart about what paths to try.
Graph Algorithms: Shortest Path
Dijkstra's Shortest Path Algorithm
Weighted Graphs AQR.
CS 3013: DS & Algorithms Shortest Paths.
Chapter 9: Graphs Shortest Paths
Informed Search Idea: be smart about what paths to try.
Presentation transcript:

Finding the optimal building to place a police car

In the city there are some buildings. Some of them needs protection. The problem is that we have only one police car. So it’s important to choose the optimal building to place the car near it.

We neglect the values such as the amount of goods that can be taken from building the probability that a crime will be performed in the building So by “optimal building” we mean that by choosing this building we will maximize the number of caught criminals.

Plan 1) Development environment 2) Dijkstra's algorithm 3) Solution for the main problem

ShiVa3D is the developers’ tool for easily creating 3D applications. ShiVa is a WYSIWYG 3D Editor.

The ShiVa3D is a true multi- platform 3D game engine, which handles advanced shading systems, physics engine, HUD rendering and the sound library.

Game Scripting ShiVa scripting is based upon an optimized version of Lua. You can also code directly in C, C++ and Objective-C

ShiVa Authoring Tool compiles projects generated by ShiVa Editor into executable applications for all the supported devices : Windows, Mac, Linux, iPhone, iPad, Android, BlackBerry QNX WebOS, Airplay SDK and Wii.

Dijkstra's algorithm The algorithm finds the shortest path from one vertex to all other vertices.

Cubes are buildings. Lines between cubes are roads. Buildings that need protection are green. Building where we’ll place car near is red.

To set the city in the memory we will use graph. Buildings are vertices of graph. Roads from one building to another are edges of graph.

To find the optimal building we’ll have to traverse all buildings.

For each building: we will use Dijkstra's algorithm to calculate the shortest distance to other buildings. Then, based on distances, we will get the amount of buildings we can reach from the current building. By reaching the building we mean that a police car will get to the building before a crime is committed

In result we’ll get a list of buildings from which we can reach maximum amount of protected buildings. Example: The list is {1,2}

Now we need to choose one building from this list. We will choose the building with minimal sum of distances to the protected buildings. Example: The list is {1,2} Selected building: 2

Another example Example: The list is {1,2,3,4,5} Selected building: 2

Running time For V vertices Dijkstra's algorithm has worst running time of O(V * logV) Running time of finding maximum element from the list is in worst case O(V) Above steps are done for V vertices so the worst running time of the algorithm is O( V (V*logV + V) )

Thank you for your attention