I may not have gone where I intended to go, but I think I have ended up where I needed to be. Douglas Adams

Size: px
Start display at page:

Download "I may not have gone where I intended to go, but I think I have ended up where I needed to be. Douglas Adams"

Transcription

1 Disclaimer: I use these notes as a guide rather than a comprehensive coverage of the topic. They are neither a substitute for attending the lectures nor for reading the assigned material. I may not have gone where I intended to go, but I think I have ended up where I needed to be. Douglas Adams All you need is the plan, the road map, and the courage to press on to your destination. Earl Nightingale

2 PREVIOUSLY ON

3 Class N-3 1. How would you describe AI (generally), to not us? 2. Game AI is really about The I of I. Which is what? Supporting the P E which is all about making the game more enjoyable Doing all the things that a(nother) player or designer 3. What are ways Game AI differs from Academic AI? 4. (academic) AI in games vs. AI for games. What s that? 5. What is the complexity fallacy? 6. The essence of a game is a g_ a set of r_, and a? 7. What are three big components of game AI in-game? 8. What is a way game AI is used out-of-game?

4 Class N-2 1. What is attack kung fu style? 2. How do intentional mistakes help games? 3. What defines a graph? 4. What defines graph search? 5. Name 3 uniformed graph search algorithms. 6. What is a heuristic? 7. Admissible heuristics never estimate 8. Examples of using graphs for games

5

6

7

8

9

10

11

12

13

14

15

16

17 Is NavMesh good for all games? Not necessarily 2d Strategy game grid gives fast random access Among the best for robust pathfinding and terrain reasoning in 3d worlds Find the right solution for your problem

18 Class N-1 1. What are some benefits of path networks? 2. Cons of path networks? 3. What is the flood fill algorithm? 4. What is a simple approach to using path navigation nodes? 5. What is a navigation table? 6. How does the expanded geometry model work? Does it work with map gen features? 7. What are the major wins of a Nav Mesh? 8. Would you calculate an optimal nav-mesh?

19 findnearestwaypoint() Most engines provide a rapid nearest function for objects Spatial partitioning w/ special data structures: Quad-trees (2d), oct-trees (3d), k-d trees Binary space partitioning (BSP tree) Multi-resolution maps (hierarchical grids) The gain over all-pairs techniques depends on number of agents/objects

20 Graphs, Search, & Path Planning Continued (and maybe kinematic motion; steering and flocking)

21 PATH NETWORK SEARCH

22 Precomputing Paths Why, When Faster than computation on the fly Especially with large maps or lots of agents How Use Dijkstra s algorithm to create lookup tables Lookup cost tables Registering search requests What is the main problem with precomputed paths?

23 Dijkstra s algorithm A single-source, multi-target shortest path algorithm for arbitrary directed graphs with non-negative weights Tells you path from any one node to all other nodes

24 Given: G=(V,E), source For each vertex v in G, set dist[v] to infinity Set dist[source] = 0 Let Q = all vertices in G While Q is not empty: Let u = get vertex in Q with smallest distance value Remove u from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u Return dist[]

25 For each vertex v in G, set dist[v] to infinity Set dist[source] = 0 Let Q = all vertices in G While Q is not empty inf 6 2 inf 3 inf inf x dist[x] par[x] inf 3 inf 4 inf 5 inf 6 inf Q=[1,2,3,4,5,6] U= * Source = inf Let u = get vertex in Q with smallest distance value (node 1) dist[v]

26 Remove u (node 1) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u inf 6 2 inf 5 inf inf x dist[x] par[x] inf 4 inf 5 inf 6 inf Q=[1,2,3,4,5,6] U=1 V= * Source = parent[v] dist[v]

27 Remove u (node 1) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u inf inf inf x dist[x] dist[1]=0 par[x] 1 0 dist[2]=7 2 7 dist[3]= 1 dist[4]=inf 3 dist[5]=inf 1 4 inf dist[6]=inf 5 Q=[1,2,3,4,5,6] inf 6 inf Q=[1,2,3,4,5,6] U=1 V= * Source = parent[v] dist[v]

28 Remove u (node 1) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u inf inf x dist[x] par[x] inf 5 inf Q=[1,2,3,4,5,6] U=1 V= * Source = parent[v] dist[v]

29 inf inf x dist[x] par[x] inf 5 inf Q=[2,3,4,5,6] U=2 V= * Source = Let u = get vertex in Q with smallest distance value (node 2)

30 Remove u (node 2) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u inf inf x dist[x] par[x] inf 5 inf Q=[2,3,4,5,6] U=2 V= * Source = parent[v] dist[v]

31 Remove u (node 2) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u inf x dist[x] par[x] inf Q=[2,3,4,5,6] U=2 V= * Source = parent[v] dist[v]

32 inf x dist[x] par[x] inf Q=[3,4,5,6] U=3 V= * Source = Let u = get vertex in Q with smallest distance value (node 3)

33 Remove u (node 3) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u inf x dist[x] par[x] inf Q=[3,4,5,6] U=3 V= * Source = parent[v] dist[v]

34 Remove u (node 3) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u inf x dist[x] par[x] inf Q=[3,4,5,6] U=3 V= * Source = parent[v] dist[v]

35 inf x dist[x] par[x] inf Q=[4,5,6] U=6 V= * Source = Let u = get vertex in Q with smallest distance value (node 6)

36 Remove u (node 6) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u x dist[x] par[x] Q=[4,5,6] U=6 V= * Source = parent[v] dist[v]

37 x dist[x] par[x] Q=[4,5] U=4 V= * Source = Let u = get vertex in Q with smallest distance value (node 4)

38 Remove u (node 4) from Q For each neighbor v of u: d = dist[u] + distance(u, v) if d < dist[v] then: dist[v] = d parent[v] = u x dist[x] par[x] Q=[4,5] U=4 V= * Source = parent[v] dist[v]

39 x dist[x] par[x] Q=[5] U=5 V= * Source = Let u = get vertex in Q with smallest distance value (node 5)

40 x dist[x] par[x] Q=[ ] U=5 V= * Source = * We now know the shortest distance and shortest path to all nodes from node 1.

41 Floyd-Warshall algorithm All-pairs shortest path algorithm Tells you path from all nodes to all other nodes in weighted graph Positive or negative edge weights, but no negative cycles (edges sum to negative) Incrementally improves estimate O( V 3 ) [Use Dijkstra from each starting vertex when the graph is sparse and has non-negative edges]

42 Given: G=(V,E), source For each edge (u, v) do: dist[u][v] = weight of edge (u, v) or infinity next[u][v] = v For k = 1 to V do: for i = 1 to V do: for j = 1 to V do: Intermediate node Start node End node if dist[i][k] + dist[k][j] < dist[i][j] then: dist[i][j] = dist[i][k] + dist[k][j] next[i][j] = next[i][k]

43 Distance INF INF INF 1 INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF k = 0 i = 0 j = Next

44 0 Distance INF INF INF INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF 4 3 Next M S k = 2 i = F j = < INF 4 2 3

45 Distance INF 10 INF 1 INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF M S F 3 4 k = 2 i = 0 j = 3 0 -> 3: dist 10, goto 2 Next

46 0 Distance INF 10 INF INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF 4 3 Next M S k = 2 i = F j = < INF 4 2 3

47 Distance INF INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF M S F 3 4 k = 2 i = 0 j = 4 0 -> 3: dist 10, goto 2 Next

48 Distance INF INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF M S F 3 4 k = 3 i = 0 j = < 15 Next

49 Distance INF INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF M S F 3 4 k = 3 i = 0 j = 4 0 -> 4: dist 13, goto 2 Next

50 Distance INF INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF M S F 3 4 k = 3 i = 2 j = < 6 Next

51 Distance INF INF INF INF 2 INF INF INF 1 INF 3 4 INF INF 6 3 INF M S F 3 4 k = 3 i = 2 j = 4 2 -> 4: dist 4, goto 3 Next

52 Distance INF INF INF INF 1 INF 3 4 INF INF 6 3 INF

53 Reconstructing the path Want to go from u to v if next[u][v] is empty then return null path path = (u) while u <> v do: u = next[u][v] path.append(u) return path

54 Dynamic environments Terrain can change Jumpable? Kickable? Too big to jump/kick? Typically: destructible environments Path network edges can be eliminated Path network edges can be created

55 Heuristic Search Find shortest path from a single source to a single destination Heuristic function: We have some knowledge about how far away any given state from the goal, in terms of operation cost For navigation: Euclidean distance, Manhattan distance

56 A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 S 253 T 32 U 80 V 1 Z 374

57 A* Search Single source, single target graph search Generalization of Dijkstra Guaranteed to return the optimal path if the heuristic is admissible; quick and accurate Evaluate each state: f(n) = g(n) + h(n) Open list: nodes that are known and waiting to be visited Closed list: nodes that have been visited

58 A* Given: init, goal(s), ops ops = { } closed = nil open = {init} current = init while (NOT isgoal(current) AND open <> nil) closed = closed + {current} open = open {current} + (successors(current, ops) closed) current = first(open) end while if isgoal(current) then reconstruct solution else fail * Insert according to evaluation function

59 Evaluation function f(n) = g(n) + h(n) A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 S 253 T 32 U 80 V 1 Z 374 Open: A(366) Closed:

60 Evaluation function f(n) = g(n) + h(n) A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 S 253 T 32 U 80 V 1 Z 374 Open: S( =33), T(32+118=447), Z(374+75=44) Closed: A(366)

61 Evaluation function f(n) = g(n) + h(n) A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 S 253 T 32 U 80 V 1 Z 374 Open: R(220+13=413), F(23+176=415), T(32+118=447), Z(374+75=44), O(21+380=671) Closed: S(33), A(366)

62 Evaluation function f(n) = g(n) + h(n) A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 S 253 T 32 U 80 V 1 Z 374 Open: F(23+176=415), P( =417), T(32+118=447), Z(374+75=44), C( =526), O Closed: R(413), S(33), A(366)

63 Evaluation function f(n) = g(n) + h(n) A 366 B 0 C 160 D 242 E 161 F 176 Backtrack! G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 S 253 T 32 U 80 V 1 Z 374 Open: P( =417), T(32+118=447), Z(374+75=44), B(450+0=450), C( =526), O(2 Closed: F(415), R(413), S(33), A(366)

64 Evaluation function f(n) = g(n) + h(n) A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 S 253 T 32 U 80 V 1 Z 374 Open: B(418+0=418), T(32+118=447), Z(374+75=44), C( =526), O(21+380=671) Closed: P(417), F(415), R(413), S(33), A(366)

65 Evaluation function f(n) = g(n) + h(n) A 366 B 0 C 160 D 242 E 161 F 176 G 77 H 151 I 226 L 244 M 241 N 234 O 380 P 100 S 253 T 32 U 80 V 1 Z 374 Solution: A-S-R-P-B Open: T(32+118=447), Z(374+75=44), C( =526), O(21+380=671) Closed: B(418), P(417), F(415), R(413), S(33), A(366)

66 A* Search A* is optimal but only if you use an admissible heuristic An admissible heuristic is mathematically guaranteed to underestimate the cost of reaching a goal What is an admissible heuristic for path finding on a path network?

67 Non-Admissible Heuristics What happens if you have a non-admissible heuristic? F G Goal A B C D

68 Non-admissible heuristics Discourage agent from being in particular states Encourage agent from being in particular states

69 Hierarchical Path Planning Used to reduce CPU overhead of graph search Plan with coarse-grained and fine-grained maps People think hierarchically (more efficient) We can prune a large number of states Example: Planning a trip to NYC based on states, then individual roads

70 Hierarchical A* star.pdf Within 1% of optimal path length, but up to 10 times faster

71 How high up do you go? As high as you can without start and end being in the same node.

72 1. Build clusters. Can be arbitrary 2. Find transitions, a (possibly empty) set of obstacle-free locations. 3. Inter-edges: Place a node on either side of transition, and link them (cost 1). 4. Intra-edges: Search between nodes inside cluster, record cost. * Can keep optimal intra-cluster paths, or discard for memory savings.

73 1. Start cluster: Search within cluster to the border 2. Search across clusters to the goal cluster 3. Goal cluster: Search from border to goal 4. Path smoothing * Really just adds start and goal to the hierarchy graph

74 Path Smoothing in Hierarchical A*

75 Sticky Situations Dynamic environments can ruin plans What do we do when an agent has been pushed back through a doorway that it has already visited? What do we do in fog of war situations? What if we have a moving target?

76 Real Time A* Online search: execute as you search Because you can t look at a state until you get there You can t backtrack No open list Modified cost function f() g(n) is actual distance from n to current state (instead of initial state) Use a hash-table to keep track of h() for nodes you have visited (because you might visit them again) Pick node with lowest f-value from immediate successors Execute move immediately After you move, update previous location h(prev) = second best f-value Second best f-value represents the estimated cost of returning to the previous state (and then add g)

77 RTA* with lookahead At every node you can see some distance DFS, then back up the value (think of it as minimin with alpha-pruning) Search out to known limit Pick best, then move Repeat, because something might change in the environment that change our assessment Things we discover as our horizon moves Things that change behind us

78 D* Lite Incremental search: replan often, but reuse search space if possible In unknown terrain, assume anything you don t know is clear (optimistic) Perform A*, execute plan until discrepancy, then replan D* Lite achieves 2x speedup over A* (when replanning)

79 Omniscient optimal : given complete information

80 Optimistic optimal : assume empty for parts you don t know.

81 Heuristic Search Recap A* Can t precompute Dynamic environments Memory issues Optimal when heuristic is admissible (and assuming no changes) Replanning can be slow on really big maps Hierarchical A* is the same, but faster

82 Heuristic Search Recap Real-time A* Stumbling in the dark, 1 step lookahead Replan every step, but fast! Realistic? For a blind agent that knows nothing Optimal when completely blind

83 Heuristic Search Recap Real-time A* with lookahead Good for fog-of-war Replan every step, with fast bounded lookahead to edge of known space Optimality depends on lookahead

84 Heuristic Search Recap D* Lite Assume everything is open/clear Replan when necessary Worst case: Runs like Real-Time A* Best case: Never replan Optimal including changes

85 See also AI Game Programming wisdom 2, CH 2 Buckland CH 8 Millington CH 4

86 Next time (KINEMATIC) MOVEMENT, STEERING, FLOCKING, FORMATIONS

Graph Search Howie Choset

Graph Search Howie Choset Graph Search Howie Choset 16-11 Outline Overview of Search Techniques A* Search Graphs Collection of Edges and Nodes (Vertices) A tree Grids Stacks and Queues Stack: First in, Last out (FILO) Queue: First

More information

CMU Lecture 4: Informed Search. Teacher: Gianni A. Di Caro

CMU Lecture 4: Informed Search. Teacher: Gianni A. Di Caro CMU 15-781 Lecture 4: Informed Search Teacher: Gianni A. Di Caro UNINFORMED VS. INFORMED Uninformed Can only generate successors and distinguish goals from non-goals Informed Strategies that can distinguish

More information

Incremental Path Planning

Incremental Path Planning Incremental Path Planning Dynamic and Incremental A* Prof. Brian Williams (help from Ihsiang Shu) 6./6.8 Cognitive Robotics February 7 th, Outline Review: Optimal Path Planning in Partially Known Environments.

More information

AI Programming CS S-06 Heuristic Search

AI Programming CS S-06 Heuristic Search AI Programming CS662-2013S-06 Heuristic Search David Galles Department of Computer Science University of San Francisco 06-0: Overview Heuristic Search - exploiting knowledge about the problem Heuristic

More information

Guest Lecture: Steering in Games. the. gamedesigninitiative at cornell university

Guest Lecture: Steering in Games. the. gamedesigninitiative at cornell university Guest Lecture: Pathfinding You are given Starting location A Goal location B Want valid path A to B Avoid impassible terrain Eschew hidden knowledge Want natural path A to B Reasonably short path Avoid

More information

Game Engineering CS F-12 Artificial Intelligence

Game Engineering CS F-12 Artificial Intelligence Game Engineering CS420-2011F-12 Artificial Intelligence David Galles Department of Computer Science University of San Francisco 12-0: Artifical Intelligence AI in games is a huge field Creating a believable

More information

CS 273 Prof. Serafim Batzoglou Prof. Jean-Claude Latombe Spring Lecture 12 : Energy maintenance (1) Lecturer: Prof. J.C.

CS 273 Prof. Serafim Batzoglou Prof. Jean-Claude Latombe Spring Lecture 12 : Energy maintenance (1) Lecturer: Prof. J.C. CS 273 Prof. Serafim Batzoglou Prof. Jean-Claude Latombe Spring 2006 Lecture 12 : Energy maintenance (1) Lecturer: Prof. J.C. Latombe Scribe: Neda Nategh How do you update the energy function during the

More information

CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms

CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms Professor Henry Carter Fall 2016 Recap Space-time tradeoffs allow for faster algorithms at the cost of space complexity overhead Dynamic

More information

CS 4100 // artificial intelligence. Recap/midterm review!

CS 4100 // artificial intelligence. Recap/midterm review! CS 4100 // artificial intelligence instructor: byron wallace Recap/midterm review! Attribution: many of these slides are modified versions of those distributed with the UC Berkeley CS188 materials Thanks

More information

CS 188 Introduction to Fall 2007 Artificial Intelligence Midterm

CS 188 Introduction to Fall 2007 Artificial Intelligence Midterm NAME: SID#: Login: Sec: 1 CS 188 Introduction to Fall 2007 Artificial Intelligence Midterm You have 80 minutes. The exam is closed book, closed notes except a one-page crib sheet, basic calculators only.

More information

CSC236 Week 3. Larry Zhang

CSC236 Week 3. Larry Zhang CSC236 Week 3 Larry Zhang 1 Announcements Problem Set 1 due this Friday Make sure to read Submission Instructions on the course web page. Search for Teammates on Piazza Educational memes: http://www.cs.toronto.edu/~ylzhang/csc236/memes.html

More information

Scout, NegaScout and Proof-Number Search

Scout, NegaScout and Proof-Number Search Scout, NegaScout and Proof-Number Search Tsan-sheng Hsu tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu 1 Introduction It looks like alpha-beta pruning is the best we can do for a generic searching

More information

Register Allocation. Maryam Siahbani CMPT 379 4/5/2016 1

Register Allocation. Maryam Siahbani CMPT 379 4/5/2016 1 Register Allocation Maryam Siahbani CMPT 379 4/5/2016 1 Register Allocation Intermediate code uses unlimited temporaries Simplifying code generation and optimization Complicates final translation to assembly

More information

Algorithms for Playing and Solving games*

Algorithms for Playing and Solving games* Algorithms for Playing and Solving games* Andrew W. Moore Professor School of Computer Science Carnegie Mellon University www.cs.cmu.edu/~awm awm@cs.cmu.edu 412-268-7599 * Two Player Zero-sum Discrete

More information

Learning in State-Space Reinforcement Learning CIS 32

Learning in State-Space Reinforcement Learning CIS 32 Learning in State-Space Reinforcement Learning CIS 32 Functionalia Syllabus Updated: MIDTERM and REVIEW moved up one day. MIDTERM: Everything through Evolutionary Agents. HW 2 Out - DUE Sunday before the

More information

The Inductive Proof Template

The Inductive Proof Template CS103 Handout 24 Winter 2016 February 5, 2016 Guide to Inductive Proofs Induction gives a new way to prove results about natural numbers and discrete structures like games, puzzles, and graphs. All of

More information

N/4 + N/2 + N = 2N 2.

N/4 + N/2 + N = 2N 2. CS61B Summer 2006 Instructor: Erin Korber Lecture 24, 7 Aug. 1 Amortized Analysis For some of the data structures we ve discussed (namely hash tables and splay trees), it was claimed that the average time

More information

Introduction to Computer Science and Programming for Astronomers

Introduction to Computer Science and Programming for Astronomers Introduction to Computer Science and Programming for Astronomers Lecture 8. István Szapudi Institute for Astronomy University of Hawaii March 7, 2018 Outline Reminder 1 Reminder 2 3 4 Reminder We have

More information

Breadth First Search, Dijkstra s Algorithm for Shortest Paths

Breadth First Search, Dijkstra s Algorithm for Shortest Paths CS 374: Algorithms & Models of Computation, Spring 2017 Breadth First Search, Dijkstra s Algorithm for Shortest Paths Lecture 17 March 1, 2017 Chandra Chekuri (UIUC) CS374 1 Spring 2017 1 / 42 Part I Breadth

More information

Lecture 3: Big-O and Big-Θ

Lecture 3: Big-O and Big-Θ Lecture 3: Big-O and Big-Θ COSC4: Algorithms and Data Structures Brendan McCane Department of Computer Science, University of Otago Landmark functions We saw that the amount of work done by Insertion Sort,

More information

Skylines. Yufei Tao. ITEE University of Queensland. INFS4205/7205, Uni of Queensland

Skylines. Yufei Tao. ITEE University of Queensland. INFS4205/7205, Uni of Queensland Yufei Tao ITEE University of Queensland Today we will discuss problems closely related to the topic of multi-criteria optimization, where one aims to identify objects that strike a good balance often optimal

More information

Alpha-Beta Pruning: Algorithm and Analysis

Alpha-Beta Pruning: Algorithm and Analysis Alpha-Beta Pruning: Algorithm and Analysis Tsan-sheng Hsu tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu 1 Introduction Alpha-beta pruning is the standard searching procedure used for solving

More information

MAKING A BINARY HEAP

MAKING A BINARY HEAP CSE 101 Algorithm Design and Analysis Miles Jones mej016@eng.uc sd.edu Office 4208 CSE Building Lecture 19: Divide and Conquer Design examples/dynamic Programming MAKING A BINARY HEAP Base case. Break

More information

ICS 252 Introduction to Computer Design

ICS 252 Introduction to Computer Design ICS 252 fall 2006 Eli Bozorgzadeh Computer Science Department-UCI References and Copyright Textbooks referred [Mic94] G. De Micheli Synthesis and Optimization of Digital Circuits McGraw-Hill, 1994. [CLR90]

More information

IS 709/809: Computational Methods in IS Research Fall Exam Review

IS 709/809: Computational Methods in IS Research Fall Exam Review IS 709/809: Computational Methods in IS Research Fall 2017 Exam Review Nirmalya Roy Department of Information Systems University of Maryland Baltimore County www.umbc.edu Exam When: Tuesday (11/28) 7:10pm

More information

Lexical Analysis: DFA Minimization & Wrap Up

Lexical Analysis: DFA Minimization & Wrap Up Lexical Analysis: DFA Minimization & Wrap Up Automating Scanner Construction PREVIOUSLY RE NFA (Thompson s construction) Build an NFA for each term Combine them with -moves NFA DFA (subset construction)

More information

P, NP, NP-Complete. Ruth Anderson

P, NP, NP-Complete. Ruth Anderson P, NP, NP-Complete Ruth Anderson A Few Problems: Euler Circuits Hamiltonian Circuits Intractability: P and NP NP-Complete What now? Today s Agenda 2 Try it! Which of these can you draw (trace all edges)

More information

Scout and NegaScout. Tsan-sheng Hsu.

Scout and NegaScout. Tsan-sheng Hsu. Scout and NegaScout Tsan-sheng Hsu tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu 1 Abstract It looks like alpha-beta pruning is the best we can do for an exact generic searching procedure.

More information

Constraint sat. prob. (Ch. 6)

Constraint sat. prob. (Ch. 6) Constraint sat. prob. (Ch. 6) ypes of constraints ry to do this job problem with: J1, J2 and J3 Jobs cannot overlap J3 takes 3 time units J2 takes 2 time units J1 takes 1 time unit J1 must happen before

More information

1 Terminology and setup

1 Terminology and setup 15-451/651: Design & Analysis of Algorithms August 31, 2017 Lecture #2 last changed: August 29, 2017 In this lecture, we will examine some simple, concrete models of computation, each with a precise definition

More information

CS188: Artificial Intelligence, Fall 2009 Written 2: MDPs, RL, and Probability

CS188: Artificial Intelligence, Fall 2009 Written 2: MDPs, RL, and Probability CS188: Artificial Intelligence, Fall 2009 Written 2: MDPs, RL, and Probability Due: Thursday 10/15 in 283 Soda Drop Box by 11:59pm (no slip days) Policy: Can be solved in groups (acknowledge collaborators)

More information

Lecture - 24 Radial Basis Function Networks: Cover s Theorem

Lecture - 24 Radial Basis Function Networks: Cover s Theorem Neural Network and Applications Prof. S. Sengupta Department of Electronic and Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture - 24 Radial Basis Function Networks:

More information

M155 Exam 2 Concept Review

M155 Exam 2 Concept Review M155 Exam 2 Concept Review Mark Blumstein DERIVATIVES Product Rule Used to take the derivative of a product of two functions u and v. u v + uv Quotient Rule Used to take a derivative of the quotient of

More information

Value-Ordering and Discrepancies. Ciaran McCreesh and Patrick Prosser

Value-Ordering and Discrepancies. Ciaran McCreesh and Patrick Prosser Value-Ordering and Discrepancies Maintaining Arc Consistency (MAC) Achieve (generalised) arc consistency (AC3, etc). If we have a domain wipeout, backtrack. If all domains have one value, we re done. Pick

More information

DD* Lite: Efficient Incremental Search with State Dominance

DD* Lite: Efficient Incremental Search with State Dominance DD* Lite: Efficient Incremental Search with State Dominance G. Ayorkor Mills-Tettey Anthony Stentz M. Bernardine Dias CMU-RI-TR-07-12 May 2007 Robotics Institute Carnegie Mellon University Pittsburgh,

More information

Informed Search. Chap. 4. Breadth First. O(Min(N,B L )) BFS. Search. have same cost BIBFS. Bi- Direction. O(Min(N,2B L/2 )) BFS. have same cost UCS

Informed Search. Chap. 4. Breadth First. O(Min(N,B L )) BFS. Search. have same cost BIBFS. Bi- Direction. O(Min(N,2B L/2 )) BFS. have same cost UCS Informed Search Chap. 4 Material in part from http://www.cs.cmu.edu/~awm/tutorials Uninformed Search Complexity N = Total number of states B = Average number of successors (branching factor) L = Length

More information

Time Dependent Contraction Hierarchies Basic Algorithmic Ideas

Time Dependent Contraction Hierarchies Basic Algorithmic Ideas Time Dependent Contraction Hierarchies Basic Algorithmic Ideas arxiv:0804.3947v1 [cs.ds] 24 Apr 2008 Veit Batz, Robert Geisberger and Peter Sanders Universität Karlsruhe (TH), 76128 Karlsruhe, Germany

More information

CS/COE

CS/COE CS/COE 1501 www.cs.pitt.edu/~nlf4/cs1501/ P vs NP But first, something completely different... Some computational problems are unsolvable No algorithm can be written that will always produce the correct

More information

Last time: Summary. Last time: Summary

Last time: Summary. Last time: Summary 1 Last time: Summary Definition of AI? Turing Test? Intelligent Agents: Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through its effectors

More information

Algorithms and Data Structures 2016 Week 5 solutions (Tues 9th - Fri 12th February)

Algorithms and Data Structures 2016 Week 5 solutions (Tues 9th - Fri 12th February) Algorithms and Data Structures 016 Week 5 solutions (Tues 9th - Fri 1th February) 1. Draw the decision tree (under the assumption of all-distinct inputs) Quicksort for n = 3. answer: (of course you should

More information

Algorithm Design Strategies V

Algorithm Design Strategies V Algorithm Design Strategies V Joaquim Madeira Version 0.0 October 2016 U. Aveiro, October 2016 1 Overview The 0-1 Knapsack Problem Revisited The Fractional Knapsack Problem Greedy Algorithms Example Coin

More information

University of California Berkeley CS170: Efficient Algorithms and Intractable Problems November 19, 2001 Professor Luca Trevisan. Midterm 2 Solutions

University of California Berkeley CS170: Efficient Algorithms and Intractable Problems November 19, 2001 Professor Luca Trevisan. Midterm 2 Solutions University of California Berkeley Handout MS2 CS170: Efficient Algorithms and Intractable Problems November 19, 2001 Professor Luca Trevisan Midterm 2 Solutions Problem 1. Provide the following information:

More information

Informed Search. Day 3 of Search. Chap. 4, Russel & Norvig. Material in part from

Informed Search. Day 3 of Search. Chap. 4, Russel & Norvig. Material in part from Informed Search Day 3 of Search Chap. 4, Russel & Norvig Material in part from http://www.cs.cmu.edu/~awm/tutorials Uninformed Search Complexity N = Total number of states B = Average number of successors

More information

Great Theoretical Ideas in Computer Science. Lecture 7: Introduction to Computational Complexity

Great Theoretical Ideas in Computer Science. Lecture 7: Introduction to Computational Complexity 15-251 Great Theoretical Ideas in Computer Science Lecture 7: Introduction to Computational Complexity September 20th, 2016 What have we done so far? What will we do next? What have we done so far? > Introduction

More information

Wolf-Tilo Balke Silviu Homoceanu Institut für Informationssysteme Technische Universität Braunschweig

Wolf-Tilo Balke Silviu Homoceanu Institut für Informationssysteme Technische Universität Braunschweig Multimedia Databases Wolf-Tilo Balke Silviu Homoceanu Institut für Informationssysteme Technische Universität Braunschweig http://www.ifis.cs.tu-bs.de 13 Indexes for Multimedia Data 13 Indexes for Multimedia

More information

Jeffrey D. Ullman Stanford University

Jeffrey D. Ullman Stanford University Jeffrey D. Ullman Stanford University 3 We are given a set of training examples, consisting of input-output pairs (x,y), where: 1. x is an item of the type we want to evaluate. 2. y is the value of some

More information

Complexity Theory of Polynomial-Time Problems

Complexity Theory of Polynomial-Time Problems Complexity Theory of Polynomial-Time Problems Lecture 1: Introduction, Easy Examples Karl Bringmann and Sebastian Krinninger Audience no formal requirements, but: NP-hardness, satisfiability problem, how

More information

CSE 332. Data Abstractions

CSE 332. Data Abstractions Adam Blank Lecture 23 Autumn 2015 CSE 332 Data Abstractions CSE 332: Data Abstractions Graphs 4: Minimum Spanning Trees Final Dijkstra s Algorithm 1 1 dijkstra(g, source) { 2 dist = new Dictionary(); 3

More information

What is SSA? each assignment to a variable is given a unique name all of the uses reached by that assignment are renamed

What is SSA? each assignment to a variable is given a unique name all of the uses reached by that assignment are renamed Another Form of Data-Flow Analysis Propagation of values for a variable reference, where is the value produced? for a variable definition, where is the value consumed? Possible answers reaching definitions,

More information

εx 2 + x 1 = 0. (2) Suppose we try a regular perturbation expansion on it. Setting ε = 0 gives x 1 = 0,

εx 2 + x 1 = 0. (2) Suppose we try a regular perturbation expansion on it. Setting ε = 0 gives x 1 = 0, 4 Rescaling In this section we ll look at one of the reasons that our ε = 0 system might not have enough solutions, and introduce a tool that is fundamental to all perturbation systems. We ll start with

More information

CS188: Artificial Intelligence, Fall 2009 Written 2: MDPs, RL, and Probability

CS188: Artificial Intelligence, Fall 2009 Written 2: MDPs, RL, and Probability CS188: Artificial Intelligence, Fall 2009 Written 2: MDPs, RL, and Probability Due: Thursday 10/15 in 283 Soda Drop Box by 11:59pm (no slip days) Policy: Can be solved in groups (acknowledge collaborators)

More information

A.I.: Beyond Classical Search

A.I.: Beyond Classical Search A.I.: Beyond Classical Search Random Sampling Trivial Algorithms Generate a state randomly Random Walk Randomly pick a neighbor of the current state Both algorithms asymptotically complete. Overview Previously

More information

Mock Exam Künstliche Intelligenz-1. Different problems test different skills and knowledge, so do not get stuck on one problem.

Mock Exam Künstliche Intelligenz-1. Different problems test different skills and knowledge, so do not get stuck on one problem. Name: Matriculation Number: Mock Exam Künstliche Intelligenz-1 January 9., 2017 You have one hour(sharp) for the test; Write the solutions to the sheet. The estimated time for solving this exam is 53 minutes,

More information

Complex Networks CSYS/MATH 303, Spring, Prof. Peter Dodds

Complex Networks CSYS/MATH 303, Spring, Prof. Peter Dodds Complex Networks CSYS/MATH 303, Spring, 2011 Prof. Peter Dodds Department of Mathematics & Statistics Center for Complex Systems Vermont Advanced Computing Center University of Vermont Licensed under the

More information

Multimedia Databases 1/29/ Indexes for Multimedia Data Indexes for Multimedia Data Indexes for Multimedia Data

Multimedia Databases 1/29/ Indexes for Multimedia Data Indexes for Multimedia Data Indexes for Multimedia Data 1/29/2010 13 Indexes for Multimedia Data 13 Indexes for Multimedia Data 13.1 R-Trees Multimedia Databases Wolf-Tilo Balke Silviu Homoceanu Institut für Informationssysteme Technische Universität Braunschweig

More information

MAKING A BINARY HEAP

MAKING A BINARY HEAP CSE 101 Algorithm Design and Analysis Miles Jones mej016@eng.uc sd.edu Office 4208 CSE Building Lecture 19: Divide and Conquer Design examples/dynamic Programming MAKING A BINARY HEAP Base case. Break

More information

Algorithms: Lecture 12. Chalmers University of Technology

Algorithms: Lecture 12. Chalmers University of Technology Algorithms: Lecture 1 Chalmers University of Technology Today s Topics Shortest Paths Network Flow Algorithms Shortest Path in a Graph Shortest Path Problem Shortest path network. Directed graph G = (V,

More information

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018

Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018 CS17 Integrated Introduction to Computer Science Klein Contents Lecture 17: Trees and Merge Sort 10:00 AM, Oct 15, 2018 1 Tree definitions 1 2 Analysis of mergesort using a binary tree 1 3 Analysis of

More information

Robust Knowledge and Rationality

Robust Knowledge and Rationality Robust Knowledge and Rationality Sergei Artemov The CUNY Graduate Center 365 Fifth Avenue, 4319 New York City, NY 10016, USA sartemov@gc.cuny.edu November 22, 2010 Abstract In 1995, Aumann proved that

More information

Math Models of OR: Branch-and-Bound

Math Models of OR: Branch-and-Bound Math Models of OR: Branch-and-Bound John E. Mitchell Department of Mathematical Sciences RPI, Troy, NY 12180 USA November 2018 Mitchell Branch-and-Bound 1 / 15 Branch-and-Bound Outline 1 Branch-and-Bound

More information

Minimax strategies, alpha beta pruning. Lirong Xia

Minimax strategies, alpha beta pruning. Lirong Xia Minimax strategies, alpha beta pruning Lirong Xia Reminder ØProject 1 due tonight Makes sure you DO NOT SEE ERROR: Summation of parsed points does not match ØProject 2 due in two weeks 2 How to find good

More information

CSE 4502/5717 Big Data Analytics Spring 2018; Homework 1 Solutions

CSE 4502/5717 Big Data Analytics Spring 2018; Homework 1 Solutions CSE 502/5717 Big Data Analytics Spring 2018; Homework 1 Solutions 1. Consider the following algorithm: for i := 1 to α n log e n do Pick a random j [1, n]; If a[j] = a[j + 1] or a[j] = a[j 1] then output:

More information

CS 387/680: GAME AI MOVEMENT

CS 387/680: GAME AI MOVEMENT CS 387/680: GAME AI MOVEMENT 4/11/2017 Instructor: Santiago Ontañón so367@drexel.edu Class website: https://www.cs.drexel.edu/~santi/teaching/2017/cs387/intro.html Outline Movement Basics Aiming Jumping

More information

Foundations of Natural Language Processing Lecture 6 Spelling correction, edit distance, and EM

Foundations of Natural Language Processing Lecture 6 Spelling correction, edit distance, and EM Foundations of Natural Language Processing Lecture 6 Spelling correction, edit distance, and EM Alex Lascarides (Slides from Alex Lascarides and Sharon Goldwater) 2 February 2019 Alex Lascarides FNLP Lecture

More information

A* with Lookahead Re-evaluated

A* with Lookahead Re-evaluated A* with Lookahead Re-evaluated Zhaoxing Bu Department of Computing Science University of Alberta Edmonton, AB Canada T6G 2E8 zhaoxing@ualberta.ca Roni Stern and Ariel Felner Information Systems Engineering

More information

b + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d

b + O(n d ) where a 1, b > 1, then O(n d log n) if a = b d d ) if a < b d O(n log b a ) if a > b d CS161, Lecture 4 Median, Selection, and the Substitution Method Scribe: Albert Chen and Juliana Cook (2015), Sam Kim (2016), Gregory Valiant (2017) Date: January 23, 2017 1 Introduction Last lecture, we

More information

CITS4211 Mid-semester test 2011

CITS4211 Mid-semester test 2011 CITS4211 Mid-semester test 2011 Fifty minutes, answer all four questions, total marks 60 Question 1. (12 marks) Briefly describe the principles, operation, and performance issues of iterative deepening.

More information

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness Lecture 19 NP-Completeness I 19.1 Overview In the past few lectures we have looked at increasingly more expressive problems that we were able to solve using efficient algorithms. In this lecture we introduce

More information

A Simple Implementation Technique for Priority Search Queues

A Simple Implementation Technique for Priority Search Queues A Simple Implementation Technique for Priority Search Queues RALF HINZE Institute of Information and Computing Sciences Utrecht University Email: ralf@cs.uu.nl Homepage: http://www.cs.uu.nl/~ralf/ April,

More information

CS 387/680: GAME AI MOVEMENT

CS 387/680: GAME AI MOVEMENT CS 387/680: GAME AI MOVEMENT 4/5/2016 Instructor: Santiago Ontañón santi@cs.drexel.edu Class website: https://www.cs.drexel.edu/~santi/teaching/2016/cs387/intro.html Reminders Check Blackboard site for

More information

Query Processing in Spatial Network Databases

Query Processing in Spatial Network Databases Temporal and Spatial Data Management Fall 0 Query Processing in Spatial Network Databases SL06 Spatial network databases Shortest Path Incremental Euclidean Restriction Incremental Network Expansion Spatial

More information

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University Algorithms NP -Complete Problems Dong Kyue Kim Hanyang University dqkim@hanyang.ac.kr The Class P Definition 13.2 Polynomially bounded An algorithm is said to be polynomially bounded if its worst-case

More information

Quiz 1 Solutions. Problem 2. Asymptotics & Recurrences [20 points] (3 parts)

Quiz 1 Solutions. Problem 2. Asymptotics & Recurrences [20 points] (3 parts) Introduction to Algorithms October 13, 2010 Massachusetts Institute of Technology 6.006 Fall 2010 Professors Konstantinos Daskalakis and Patrick Jaillet Quiz 1 Solutions Quiz 1 Solutions Problem 1. We

More information

Searching in non-deterministic, partially observable and unknown environments

Searching in non-deterministic, partially observable and unknown environments Searching in non-deterministic, partially observable and unknown environments CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2014 Soleymani Artificial Intelligence:

More information

Data Structures. Outline. Introduction. Andres Mendez-Vazquez. December 3, Data Manipulation Examples

Data Structures. Outline. Introduction. Andres Mendez-Vazquez. December 3, Data Manipulation Examples Data Structures Introduction Andres Mendez-Vazquez December 3, 2015 1 / 53 Outline 1 What the Course is About? Data Manipulation Examples 2 What is a Good Algorithm? Sorting Example A Naive Algorithm Counting

More information

Reinforcement Learning

Reinforcement Learning Reinforcement Learning Function approximation Mario Martin CS-UPC May 18, 2018 Mario Martin (CS-UPC) Reinforcement Learning May 18, 2018 / 65 Recap Algorithms: MonteCarlo methods for Policy Evaluation

More information

Midterm. Introduction to Artificial Intelligence. CS 188 Summer You have approximately 2 hours and 50 minutes.

Midterm. Introduction to Artificial Intelligence. CS 188 Summer You have approximately 2 hours and 50 minutes. CS 188 Summer 2014 Introduction to Artificial Intelligence Midterm You have approximately 2 hours and 50 minutes. The exam is closed book, closed notes except your one-page crib sheet. Mark your answers

More information

5 + 9(10) + 3(100) + 0(1000) + 2(10000) =

5 + 9(10) + 3(100) + 0(1000) + 2(10000) = Chapter 5 Analyzing Algorithms So far we have been proving statements about databases, mathematics and arithmetic, or sequences of numbers. Though these types of statements are common in computer science,

More information

CS264: Beyond Worst-Case Analysis Lecture #11: LP Decoding

CS264: Beyond Worst-Case Analysis Lecture #11: LP Decoding CS264: Beyond Worst-Case Analysis Lecture #11: LP Decoding Tim Roughgarden October 29, 2014 1 Preamble This lecture covers our final subtopic within the exact and approximate recovery part of the course.

More information

CSCB63 Winter Week 11 Bloom Filters. Anna Bretscher. March 30, / 13

CSCB63 Winter Week 11 Bloom Filters. Anna Bretscher. March 30, / 13 CSCB63 Winter 2019 Week 11 Bloom Filters Anna Bretscher March 30, 2019 1 / 13 Today Bloom Filters Definition Expected Complexity Applications 2 / 13 Bloom Filters (Specification) A bloom filter is a probabilistic

More information

Alpha-Beta Pruning: Algorithm and Analysis

Alpha-Beta Pruning: Algorithm and Analysis Alpha-Beta Pruning: Algorithm and Analysis Tsan-sheng Hsu tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu 1 Introduction Alpha-beta pruning is the standard searching procedure used for 2-person

More information

Faster than Weighted A*: An Optimistic Approach to Bounded Suboptimal Search

Faster than Weighted A*: An Optimistic Approach to Bounded Suboptimal Search Faster than Weighted A*: An Optimistic Approach to Bounded Suboptimal Search Jordan Thayer and Wheeler Ruml {jtd7, ruml} at cs.unh.edu Jordan Thayer (UNH) Optimistic Search 1 / 45 Motivation Motivation

More information

CS264: Beyond Worst-Case Analysis Lecture #4: Parameterized Analysis of Online Paging

CS264: Beyond Worst-Case Analysis Lecture #4: Parameterized Analysis of Online Paging CS264: Beyond Worst-Case Analysis Lecture #4: Parameterized Analysis of Online Paging Tim Roughgarden January 19, 2017 1 Preamble Recall our three goals for the mathematical analysis of algorithms: the

More information

CS 241 Analysis of Algorithms

CS 241 Analysis of Algorithms CS 241 Analysis of Algorithms Professor Eric Aaron Lecture T Th 9:00am Lecture Meeting Location: OLB 205 Business Grading updates: HW5 back today HW7 due Dec. 10 Reading: Ch. 22.1-22.3, Ch. 25.1-2, Ch.

More information

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16 600.463 Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Intro to Learning Theory Date: 12/8/16 25.1 Introduction Today we re going to talk about machine learning, but from an

More information

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]

[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.] Math 43 Review Notes [Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty Dot Product If v (v, v, v 3 and w (w, w, w 3, then the

More information

INF4130: Dynamic Programming September 2, 2014 DRAFT version

INF4130: Dynamic Programming September 2, 2014 DRAFT version INF4130: Dynamic Programming September 2, 2014 DRAFT version In the textbook: Ch. 9, and Section 20.5 Chapter 9 can also be found at the home page for INF4130 These slides were originally made by Petter

More information

ASYMPTOTIC COMPLEXITY SEARCHING/SORTING

ASYMPTOTIC COMPLEXITY SEARCHING/SORTING Quotes about loops O! Thou hast damnable iteration and art, indeed, able to corrupt a saint. Shakespeare, Henry IV, Pt I, 1 ii Use not vain repetition, as the heathen do. Matthew V, 48 Your if is the only

More information

Reinforcement Learning. Spring 2018 Defining MDPs, Planning

Reinforcement Learning. Spring 2018 Defining MDPs, Planning Reinforcement Learning Spring 2018 Defining MDPs, Planning understandability 0 Slide 10 time You are here Markov Process Where you will go depends only on where you are Markov Process: Information state

More information

Shortest Path Algorithms

Shortest Path Algorithms Shortest Path Algorithms Andreas Klappenecker [based on slides by Prof. Welch] 1 Single Source Shortest Path 2 Single Source Shortest Path Given: a directed or undirected graph G = (V,E) a source node

More information

Lexical Analysis Part II: Constructing a Scanner from Regular Expressions

Lexical Analysis Part II: Constructing a Scanner from Regular Expressions Lexical Analysis Part II: Constructing a Scanner from Regular Expressions CS434 Spring 2005 Department of Computer Science University of Alabama Joel Jones Copyright 2003, Keith D. Cooper, Ken Kennedy

More information

Solutions to the Midterm Practice Problems

Solutions to the Midterm Practice Problems CMSC 451:Fall 2017 Dave Mount Solutions to the Midterm Practice Problems Solution 1: (a) Θ(n): The innermost loop is executed i times, and each time the value of i is halved. So the overall running time

More information

CS173 Lecture B, November 3, 2015

CS173 Lecture B, November 3, 2015 CS173 Lecture B, November 3, 2015 Tandy Warnow November 3, 2015 CS 173, Lecture B November 3, 2015 Tandy Warnow Announcements Examlet 7 is a take-home exam, and is due November 10, 11:05 AM, in class.

More information

CS221 Practice Midterm

CS221 Practice Midterm CS221 Practice Midterm Autumn 2012 1 ther Midterms The following pages are excerpts from similar classes midterms. The content is similar to what we ve been covering this quarter, so that it should be

More information

Central Algorithmic Techniques. Iterative Algorithms

Central Algorithmic Techniques. Iterative Algorithms Central Algorithmic Techniques Iterative Algorithms Code Representation of an Algorithm class InsertionSortAlgorithm extends SortAlgorithm { void sort(int a[]) throws Exception { for (int i = 1; i < a.length;

More information

Mining of Massive Datasets Jure Leskovec, AnandRajaraman, Jeff Ullman Stanford University

Mining of Massive Datasets Jure Leskovec, AnandRajaraman, Jeff Ullman Stanford University Note to other teachers and users of these slides: We would be delighted if you found this our material useful in giving your own lectures. Feel free to use these slides verbatim, or to modify them to fit

More information

IS-ZC444: ARTIFICIAL INTELLIGENCE

IS-ZC444: ARTIFICIAL INTELLIGENCE IS-ZC444: ARTIFICIAL INTELLIGENCE Lecture-07: Beyond Classical Search Dr. Kamlesh Tiwari Assistant Professor Department of Computer Science and Information Systems, BITS Pilani, Pilani, Jhunjhunu-333031,

More information

1 Primals and Duals: Zero Sum Games

1 Primals and Duals: Zero Sum Games CS 124 Section #11 Zero Sum Games; NP Completeness 4/15/17 1 Primals and Duals: Zero Sum Games We can represent various situations of conflict in life in terms of matrix games. For example, the game shown

More information

A Linear Time Algorithm for Ordered Partition

A Linear Time Algorithm for Ordered Partition A Linear Time Algorithm for Ordered Partition Yijie Han School of Computing and Engineering University of Missouri at Kansas City Kansas City, Missouri 64 hanyij@umkc.edu Abstract. We present a deterministic

More information

CSE332: Data Structures & Parallelism Lecture 2: Algorithm Analysis. Ruth Anderson Winter 2018

CSE332: Data Structures & Parallelism Lecture 2: Algorithm Analysis. Ruth Anderson Winter 2018 CSE332: Data Structures & Parallelism Lecture 2: Algorithm Analysis Ruth Anderson Winter 2018 Today Algorithm Analysis What do we care about? How to compare two algorithms Analyzing Code Asymptotic Analysis

More information