6.01: Introduction to EECS I. Optimizing a Search

Size: px
Start display at page:

Download "6.01: Introduction to EECS I. Optimizing a Search"

Transcription

1 6.0: Introduction to CS I Optimizing a Search May 3, 0

2 Nano-Quiz Makeups Wednesday, May 4, 6-pm, everyone can makeup/retake NQ everyone can makeup/retake two additional NQs you can makeup/retake other NQs excused by Sˆ3 If you makeup/retake a NQ, the new score will replace the old score, even if the new score is lower!

3 Last Time We developed systematic ways to automate a search. xample: Find minimum distance path between points on a rectangular grid. C F G H I

4 Search xample Find minimum distance path between points on a rectangular grid. C F G H I Represent all possible paths with a tree (shown to just length 3). C G F F H F H H Find the shortest path from to I.

5 Order Matters Replace first node in agenda by its children: C G F F H F H H step genda 0: : : C 3: C

6 Order Matters Replace first node in agenda by its children: C G F F H F H H step genda 0: : : C 3: C

7 Order Matters Replace first node in agenda by its children: C G F F H F H H step genda 0: : : C 3: C

8 Order Matters Replace first node in agenda by its children: C G F F H F H H step genda 0: : : C 3: C

9 Order Matters Replace first node in agenda by its children: C G F F H F H H step genda 0: : : C 3: C

10 Order Matters Replace first node in agenda by its children: C G F F H F H H step genda 0: : : C 3: C epth First Search

11 Order Matters Replace last node in agenda by its children: C G F F H F H H step genda 0: : : G 3: G GH

12 Order Matters Replace last node in agenda by its children: C G F F H F H H step genda 0: : : G 3: G GH

13 Order Matters Replace last node in agenda by its children: C G F F H F H H step genda 0: : : G 3: G GH

14 Order Matters Replace last node in agenda by its children: C G F F H F H H step genda 0: : : G 3: G GH

15 Order Matters Replace last node in agenda by its children: C G F F H F H H step genda 0: : : G 3: G GH

16 Order Matters Replace last node in agenda by its children: C G F F H F H H step genda 0: : : G 3: G GH also epth First Search

17 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 0: : : C 3: C G

18 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 0: : : C 3: C G

19 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 0: : : C 3: C G

20 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 0: : : C 3: C G

21 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 0: : : C 3: C G

22 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda : : C 3: C G 4: C G

23 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda : C 3: C G 4: C G 5: G C CF

24 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 3: C G 4: C G 5: G C CF 6: G C CF F H

25 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 5: G C CF 6: G C CF F H 7: G C CF F H

26 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 7: G C CF F H 8: G C CF F H F H

27 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 8: G C CF F H F H 9: C CF F H F H G GH

28 Order Matters Remove first node from agenda. dd its children to end of agenda. C G F F H F H H step genda 8: G C CF F H F H 9: C CF F H F H G GH readth First Search

29 Order Matters Replace last node by its children (depth-first search): implement with stack (last-in, first-out). Remove first node from agenda. dd its children to the end of the agenda (breadth-first search): implement with queue (first-in, first-out).

30 Today Generalize search framework uniform cost search. Improve search efficiency heuristics.

31 ction Costs Some actions can be more costly than others. Compare navigating from to I on two grids. C 5 C 5 F F G H I G H I Modify search algorithms to account for action costs Uniform Cost Search

32 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited genda:

33 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited genda:

34 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited genda: C C

35 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited genda: C G C G

36 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited genda: C G F C G CF

37 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited genda: C G F H C G CF H

38 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited genda: C G F H C G CF H

39 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited C G F H I genda: C G CF H CFI

40 readth-first with ynamic Programming First consider actions with equal costs. C F G H I Visited C G F H I genda: C G CF H CFI

41 readth-first with ynamic Programming Notice that we expand nodes in order of increasing path length. C F G H I Visited C G F H I genda: 0 C G CF H CFI 3 3 4

42 readth-first with ynamic Programming This algorithm fails if path costs are not equal. C 5 5 F G H I Visited C G F H I genda: 0 C 6 G CF H CFI 3 Nodes are not expanded in order of increasing path length.

43 Uniform Cost Search ssociate action costs with actions. numerate paths in order of their total path cost. Find the path with the smallest path cost = sum of action costs along the path. implement agenda with priority queue.

44 Priority Queue Same basic operations as stacks and queues, with two differences: items are pushed with numeric score: the cost. popping returns the item with the smallest cost.

45 Priority Queue Push with cost, pop smallest cost first. >>> pq = PQ() >>> pq.push( a, 3) >>> pq.push( b, 6) >>> pq.push( c, ) >>> pq.pop() c >>> pq.pop() a

46 Priority Queue Simple implementation using lists. class PQ: def init (self): self.data = [] def push(self, item, cost): self.data.append((cost, item)) def pop(self): (index, cost) = util.argmaxindex(self.data, lambda (c, x): -c) return self.data.pop(index)[] # just return the data item def empty(self): return len(self.data) == 0 The pop operation in this implementation can take time proportional to the number of nodes (in the worst case). [There are better algorithms!]

47 Search Node class SearchNode: def init (self, action, state, parent, actioncost): self.state = state self.action = action self.parent = parent if self.parent: self.cost = self.parent.cost + actioncost else: self.cost = actioncost def path(self): if self.parent == None: return [(self.action, self.state)] else: return self.parent.path() + [(self.action, self.state)] def inpath(self, s): if s == self.state: return True elif self.parent == None: return False else: return self.parent.inpath(s)

48 Uniform Cost Search def ucsearch(initialstate, goaltest, actions, successor): startnode = SearchNode(None, initialstate, None, 0) if goaltest(initialstate): return startnode.path() agenda = PQ() agenda.push(startnode, 0) while not agenda.empty(): parent = agenda.pop() if goaltest(parent.state): return parent.path() for a in actions: (news, cost)= successor(parent.state, a) if not parent.inpath(news): newn = SearchNode(a, news, parent, cost) agenda.push(newn, newn.cost) return None goaltest was previously performed when children pushed on agenda. Here, we must defer goaltest until all children are pushed (since a later child might have a smaller cost). The goaltest is implemented during subsequent pop.

49 ynamic Programming Principle The shortest path from X to Z that goes through Y is made up of the shortest path from X to Y and the shortest path from Y to Z. We only need to remember the shortest path from the start state to each other state! Want to remember shortest path to Y. Therefore, defer remembering Y until all of its siblings are considered (similar to issue with goaltest) i.e., remember expansions instead of visits.

50 ucsearch with ynamic Programming def ucsearch(initialstate, goaltest, actions, successor): startnode = SearchNode(None, initialstate, None, 0) if goaltest(initialstate): return startnode.path() agenda = PQ() agenda.push(startnode, 0) expanded = {} while not agenda.empty(): parent = agenda.pop() if not expanded.has_key(parent.state): expanded[parent.state] = True if goaltest(parent.state): return parent.path() for a in actions: (news, cost) = successor(parent.state, a) if not expanded.has_key(news): newn = SearchNode(a, news, parent, cost) agenda.push(newn, newn.cost) return None

51 ucsearch with ynamic Programming C 5 5 F G H I xpanded: genda: 0

52 ucsearch with ynamic Programming C 5 5 F G H I xpanded: genda: 0

53 ucsearch with ynamic Programming C 5 5 F G H I xpanded: genda: 0 C 6

54 ucsearch with ynamic Programming C 5 5 F G H I xpanded: genda: 0 C 6 G

55 ucsearch with ynamic Programming C 5 5 F G H I xpanded: genda: 0 C 6 G F 3 H 3

56 ucsearch with ynamic Programming C 5 5 F G H I xpanded: genda: 0 C 6 G F 3 H 3

57 ucsearch with ynamic Programming C 5 5 F G H I xpanded: G genda: 0 C 6 G F 3 H 3 GH 3

58 ucsearch with ynamic Programming C 5 5 F G H I xpanded: G F genda: 0 C 6 G F 3 H 3 GH 3 FC 8 FI 4

59 ucsearch with ynamic Programming C 5 5 F G H I xpanded: G F H genda: 0 C 6 G F 3 H 3 GH 3 FC 8 FI 4 HI 4

60 ucsearch with ynamic Programming C 5 5 F G H I xpanded: G F H genda: 0 C 6 G F 3 H 3 GH 3 FC 8 FI 4 HI 4

61 ucsearch with ynamic Programming C 5 5 F G H I xpanded: G F H genda: 0 C 6 G F 3 H 3 GH 3 FC 8 FI 4 HI 4

62 Conclusion Searching spaces with unequal action costs is similar to searching spaces with equal action costs. Just substitute priority queue for queue.

63 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. Is there a way to make the search process consider not just the starting point but also the goal?

64 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: genda: 0

65 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: genda: 0 F H

66 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: genda: 0 F H C

67 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: genda: 0 F H C G

68 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F genda: 0 F H C G FC FI

69 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F H genda: 0 F H C G FC FI HG HI

70 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F H genda: 0 F H C G FC FI HG HI

71 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F H C genda: 0 F H C G FC FI HG HI

72 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F H C genda: 0 F H C G FC FI HG HI

73 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F H C G genda: 0 F H C G FC FI HG HI

74 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F H C G genda: 0 F H C G FC FI HG HI

75 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F H C G genda: 0 F H C G FC FI HG HI

76 Stumbling upon the Goal Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. xample: Start at, go to I. C F G H I xpanded: F H C G genda: 0 F H C G FC FI HG HI Too much time searching paths on wrong side of starting point!

77 Heuristics Our searches so far have radiated outward from the starting point. We only notice the goal when we stumble upon it. This results because our costs are computed for just the first part of the path: from start to state under consideration. We can add heuristics to make the search process consider not just the starting point but also the goal. Heuristic: estimate the cost of the path from the state under consideration to the goal.

78 Heuristics dd Manhattan distance to complete the path to the goal. C F G H I xpanded: genda:

79 Heuristics dd Manhattan distance to complete the path to the goal. C F G H I xpanded: genda: 4 4 F H

80 Heuristics dd Manhattan distance to complete the path to the goal. C F G H I xpanded: F genda: 4 4 F H FC 4 FI

81 Heuristics dd Manhattan distance to complete the path to the goal. C F G H I xpanded: F H genda: 4 4 F H FC 4 FI HG 4 HI

82 Heuristics dd Manhattan distance to complete the path to the goal. C F G H I xpanded: F H genda: F 4 4 H FC FI 4 HG HI 4

83 * = ucsearch with Heuristics heuristic function takes input s and returns the estimated cost from state s to the goal. def ucsearch(initialstate, goaltest, actions, successor, heuristic): startnode = SearchNode(None, initialstate, None, 0) if goaltest(initialstate): return startnode.path() agenda = PQ() agenda.push(startnode, 0) expanded = { } while not agenda.empty(): n = agenda.pop() if not expanded.has_key(n.state): expanded[n.state] = True if goaltest(n.state): return n.path() for a in actions: (news, cost) = successor(n.state, a) if not expanded.has_key(news): newn = SearchNode(a, news, n, cost) agenda.push(newn, newn.cost + heuristic(news)) return None

84 dmissible Heuristics n admissible heuristic always underestimates the actual distance. If the heuristic is larger than the actual cost from s to goal, then the best solution may be missed not acceptable! If the heuristic is smaller than the actual cost, the search space will be larger than necessary not desireable, but right answer. The ideal heuristic should be as close as possible to actual cost (without exceeding it) easy to calculate * is guaranteed to find shortest path if heuristic is admissible.

85 Check Yourself Consider three heuristic functions for the eight puzzle : a. 0 b. number of tiles out of place c. sum over tiles of Manhattan distances to their goals Let M i = # of moves in the best solution using heuristic i Let i = # of states expanded during search with heuristic i Which of the following statements is/are true?. M a = M b = M c. a = b = c 3. M a > M b > M c 4. a b c 5. the same best solution will result for all three heuristics

86 Check Yourself Heuristic a: 0 Heuristic b: number of tiles out of place Heuristic c: sum over tiles of Manhattan distances to their goals ll three heuristics are admissible each gives an optimum length solution: M a = M b = M c. heuristic c heuristic b heuristic a a b c. ifferent heuristics can consider multiple solutions with same path cost in different orders.

87 Check Yourself Consider three heuristic functions for the eight puzzle : a. 0 b. number of tiles out of place c. sum over tiles of Manhattan distances to their goals Let M i = # of moves in the best solution using heuristic i Let i = # of states expanded during search with heuristic i Which of the following statements is/are true?. M a = M b = M c. a = b = c 3. M a > M b > M c 4. a b c 5. the same best solution will result for all three heuristics

88 Check Yourself Results. Heuristic a: 0 Heuristic b: number of tiles out of place Heuristic c: sum over tiles of Manhattan distances to their goals Heuristic visited expanded moves a 77,877,475 b 6,47 6,5 c 3,048,859 Heuristics can be very effective!

89 Summary eveloped a new class of search algorithms: uniform cost. llows solution of problems with different action costs. eveloped a new class of optimizations: heuristics. Focuses search toward the goal. Nano-Quiz Makeups: Wednesday, May 4, 6-pm, everyone can makeup/retake NQ everyone can makeup/retake two additional NQs you can makeup/retake other NQs excused by Sˆ3 If you makeup/retake a NQ, the new score will replace the old score, even if the new score is lower!

90 MIT OpenCourseWare 6.0SC Introduction to lectrical ngineering and Computer Science Spring 0 For information about citing these materials or our Terms of Use, visit:

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

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

Problem Solving as State Space Search

Problem Solving as State Space Search Problem olving as tate pace earch rian. Williams 6.070 pril 5 th, 00 lides adapted from: 6.0 Tomas Lozano Perez, Russell and Norvig IM rian Williams, pring 0 elf-iagnosing Explorers courtesy of JPL rian

More information

A* Search. 1 Dijkstra Shortest Path

A* Search. 1 Dijkstra Shortest Path A* Search Consider the eight puzzle. There are eight tiles numbered 1 through 8 on a 3 by three grid with nine locations so that one location is left empty. We can move by sliding a tile adjacent to the

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

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

CS360 Homework 12 Solution

CS360 Homework 12 Solution CS360 Homework 12 Solution Constraint Satisfaction 1) Consider the following constraint satisfaction problem with variables x, y and z, each with domain {1, 2, 3}, and constraints C 1 and C 2, defined

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

Analysis of Uninformed Search Methods

Analysis of Uninformed Search Methods nalysis of Uninformed earch Methods rian. Williams 16.410-13 ep 21 st, 2004 lides adapted from: 6.034 Tomas Lozano Perez, Russell and Norvig IM rian Williams, Fall 04 1 ssignments Remember: Problem et

More information

6.01 Final Exam: Spring 2010

6.01 Final Exam: Spring 2010 Final Exam Solutions Spring 10 1 6.01 Final Exam: Spring 2010 Name: Solutions: Not correct for the make-up exam. Enter all answers in the boxes provided. During the exam you may: read any paper that you

More information

6.01 Final Exam: Spring 2010

6.01 Final Exam: Spring 2010 Final Exam Spring 10 1 6.01 Final Exam: Spring 2010 Name: Section: Enter all answers in the boxes provided. During the exam you may: read any paper that you want to use a calculator You may not use a computer,

More information

6.01 Final Exam Spring 2011

6.01 Final Exam Spring 2011 Name: Section: Enter all answers in the boxes provided. Clearly written work will be graded for partial credit. During the exam you may refer to any printed materials use a calculator You may not use a

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

Splay Trees. CMSC 420: Lecture 8

Splay Trees. CMSC 420: Lecture 8 Splay Trees CMSC 420: Lecture 8 AVL Trees Nice Features: - Worst case O(log n) performance guarantee - Fairly simple to implement Problem though: - Have to maintain etra balance factor storage at each

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

CSE548, AMS542: Analysis of Algorithms, Fall 2017 Date: Oct 26. Homework #2. ( Due: Nov 8 )

CSE548, AMS542: Analysis of Algorithms, Fall 2017 Date: Oct 26. Homework #2. ( Due: Nov 8 ) CSE548, AMS542: Analysis of Algorithms, Fall 2017 Date: Oct 26 Homework #2 ( Due: Nov 8 ) Task 1. [ 80 Points ] Average Case Analysis of Median-of-3 Quicksort Consider the median-of-3 quicksort algorithm

More information

CMSC 132, Object-Oriented Programming II Summer Lecture 12

CMSC 132, Object-Oriented Programming II Summer Lecture 12 CMSC 132, Object-Oriented Programming II Summer 2016 Lecturer: Anwar Mamat Lecture 12 Disclaimer: These notes may be distributed outside this class only with the permission of the Instructor. 12.1 Trees

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

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

Homework 2: MDPs and Search

Homework 2: MDPs and Search Graduate Artificial Intelligence 15-780 Homework 2: MDPs and Search Out on February 15 Due on February 29 Problem 1: MDPs [Felipe, 20pts] Figure 1: MDP for Problem 1. States are represented by circles

More information

Using preprocessing to speed up Brandes betweenness centrality algorithm

Using preprocessing to speed up Brandes betweenness centrality algorithm Using preprocessing to speed up Brandes betweenness centrality algorithm Steven Fleuren January 2018 BACHELOR THESIS Supervisor: Prof. Dr. R.H. Bisseling 2 1. Introduction In some applications of graph

More information

Appendix of Computational Protein Design Using AND/OR Branch and Bound Search

Appendix of Computational Protein Design Using AND/OR Branch and Bound Search Appendix of Computational Protein Design Using AND/OR Branch and Bound Search Yichao Zhou 1, Yuexin Wu 1, and Jianyang Zeng 1,2, 1 Institute for Interdisciplinary Information Sciences, Tsinghua University,

More information

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

I may not have gone where I intended to go, but I think I have ended up where I needed to be. Douglas Adams 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

More information

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007.

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007. Spring 2007 / Page 1 Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007. Don t panic. Be sure to write your name and student ID number on every page of the exam. The only materials

More information

Problem solving and search. Chapter 3. Chapter 3 1

Problem solving and search. Chapter 3. Chapter 3 1 Problem solving and search Chapter 3 Chapter 3 1 eminders ssignment 0 due 5pm today ssignment 1 posted, due 2/9 Section 105 will move to 9-10am starting next week Chapter 3 2 Problem-solving agents Problem

More information

Tree/Graph Search. q IDDFS-? B C. Search CSL452 - ARTIFICIAL INTELLIGENCE 2

Tree/Graph Search. q IDDFS-? B C. Search CSL452 - ARTIFICIAL INTELLIGENCE 2 Informed Search Tree/Graph Search q IDDFS-? A B C D E F G Search CSL452 - ARTIFICIAL INTELLIGENCE 2 Informed (Heuristic) Search q Heuristic problem specific knowledge o finds solutions more efficiently

More information

ENS Lyon Camp. Day 2. Basic group. Cartesian Tree. 26 October

ENS Lyon Camp. Day 2. Basic group. Cartesian Tree. 26 October ENS Lyon Camp. Day 2. Basic group. Cartesian Tree. 26 October Contents 1 Cartesian Tree. Definition. 1 2 Cartesian Tree. Construction 1 3 Cartesian Tree. Operations. 2 3.1 Split............................................

More information

6.01 Final Exam: Fall 2009

6.01 Final Exam: Fall 2009 6.01 Final Exam: Fall 2009 Name: ANSWERS Enter all answers in the boxes provided. You may use any paper materials you have brought. You may use a calculator. No computers, cell phones, or music players.

More information

An overview of key ideas

An overview of key ideas An overview of key ideas This is an overview of linear algebra given at the start of a course on the mathematics of engineering. Linear algebra progresses from vectors to matrices to subspaces. Vectors

More information

CS 4700: Foundations of Artificial Intelligence Homework 2 Solutions. Graph. You can get to the same single state through multiple paths.

CS 4700: Foundations of Artificial Intelligence Homework 2 Solutions. Graph. You can get to the same single state through multiple paths. CS 4700: Foundations of Artificial Intelligence Homework Solutions 1. (30 points) Imagine you have a state space where a state is represented by a tuple of three positive integers (i,j,k), and you have

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

Artificial Intelligence Methods. Problem solving by searching

Artificial Intelligence Methods. Problem solving by searching rtificial Intelligence Methods Problem solving by searching In which we see how an agent can find a sequence of actions that achieves its goals, when no single action will do. Dr. Igor Trajkovski Dr. Igor

More information

Slides for CIS 675. Huffman Encoding, 1. Huffman Encoding, 2. Huffman Encoding, 3. Encoding 1. DPV Chapter 5, Part 2. Encoding 2

Slides for CIS 675. Huffman Encoding, 1. Huffman Encoding, 2. Huffman Encoding, 3. Encoding 1. DPV Chapter 5, Part 2. Encoding 2 Huffman Encoding, 1 EECS Slides for CIS 675 DPV Chapter 5, Part 2 Jim Royer October 13, 2009 A toy example: Suppose our alphabet is { A, B, C, D }. Suppose T is a text of 130 million characters. What is

More information

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018 CS 580: Algorithm Design and Analysis Jeremiah Blocki Purdue University Spring 2018 Chapter 9 PSPACE: A Class of Problems Beyond NP Slides by Kevin Wayne. Copyright @ 2005 Pearson-Addison Wesley. All rights

More information

Priority queues implemented via heaps

Priority queues implemented via heaps Priority queues implemented via heaps Comp Sci 1575 Data s Outline 1 2 3 Outline 1 2 3 Priority queue: most important first Recall: queue is FIFO A normal queue data structure will not implement a priority

More information

Tutorial 4. Dynamic Set: Amortized Analysis

Tutorial 4. Dynamic Set: Amortized Analysis Tutorial 4 Dynamic Set: Amortized Analysis Review Binary tree Complete binary tree Full binary tree 2-tree P115 Unlike common binary tree, the base case is not an empty tree, but a external node Heap Binary

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

Finding optimal configurations ( combinatorial optimization)

Finding optimal configurations ( combinatorial optimization) CS 1571 Introduction to AI Lecture 10 Finding optimal configurations ( combinatorial optimization) Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square Constraint satisfaction problem (CSP) Constraint

More information

CS361 Homework #3 Solutions

CS361 Homework #3 Solutions CS6 Homework # Solutions. Suppose I have a hash table with 5 locations. I would like to know how many items I can store in it before it becomes fairly likely that I have a collision, i.e., that two items

More information

CS221 Practice Midterm #2 Solutions

CS221 Practice Midterm #2 Solutions CS221 Practice Midterm #2 Solutions Summer 2013 Updated 4:00pm, July 24 2 [Deterministic Search] Pacfamily (20 points) Pacman is trying eat all the dots, but he now has the help of his family! There are

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

CS188 Fall 2000 Solutions to Midterm

CS188 Fall 2000 Solutions to Midterm CS188 Fall 2000 Solutions to Midterm Problem 1 a) Two answers accepted: (The problem was more ambiguous than we intended.) TRUE without local maxima, hillclimbing will converge on the global maximum solution.

More information

Final exam of ECE 457 Applied Artificial Intelligence for the Fall term 2007.

Final exam of ECE 457 Applied Artificial Intelligence for the Fall term 2007. Fall 2007 / Page 1 Final exam of ECE 457 Applied Artificial Intelligence for the Fall term 2007. Don t panic. Be sure to write your name and student ID number on every page of the exam. The only materials

More information

Description Logics: an Introductory Course on a Nice Family of Logics. Day 2: Tableau Algorithms. Uli Sattler

Description Logics: an Introductory Course on a Nice Family of Logics. Day 2: Tableau Algorithms. Uli Sattler Description Logics: an Introductory Course on a Nice Family of Logics Day 2: Tableau Algorithms Uli Sattler 1 Warm up Which of the following subsumptions hold? r some (A and B) is subsumed by r some A

More information

Final. Introduction to Artificial Intelligence. CS 188 Spring You have approximately 2 hours and 50 minutes.

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

More information

Dictionary: an abstract data type

Dictionary: an abstract data type 2-3 Trees 1 Dictionary: an abstract data type A container that maps keys to values Dictionary operations Insert Search Delete Several possible implementations Balanced search trees Hash tables 2 2-3 trees

More information

INF2220: algorithms and data structures Series 1

INF2220: algorithms and data structures Series 1 Universitetet i Oslo Institutt for Informatikk I. Yu, D. Karabeg INF2220: algorithms and data structures Series 1 Topic Function growth & estimation of running time, trees (Exercises with hints for solution)

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

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch 6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch Today Probabilistic Turing Machines and Probabilistic Time Complexity Classes Now add a new capability to standard TMs: random

More information

Fibonacci (Min-)Heap. (I draw dashed lines in place of of circular lists.) 1 / 17

Fibonacci (Min-)Heap. (I draw dashed lines in place of of circular lists.) 1 / 17 Fibonacci (Min-)Heap A forest of heap-order trees (parent priority child priority). Roots in circular doubly-linked list. Pointer to minimum-priority root. Siblings in circular doubly-linked list; parent

More information

Methods for finding optimal configurations

Methods for finding optimal configurations CS 1571 Introduction to AI Lecture 9 Methods for finding optimal configurations Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Search for the optimal configuration Optimal configuration search:

More information

CSE 473: Artificial Intelligence Spring 2014

CSE 473: Artificial Intelligence Spring 2014 CSE 473: Artificial Intelligence Spring 2014 Hanna Hajishirzi Problem Spaces and Search slides from Dan Klein, Stuart Russell, Andrew Moore, Dan Weld, Pieter Abbeel, Luke Zettelmoyer Outline Agents that

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

Constraint satisfaction search. Combinatorial optimization search.

Constraint satisfaction search. Combinatorial optimization search. CS 1571 Introduction to AI Lecture 8 Constraint satisfaction search. Combinatorial optimization search. Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square Constraint satisfaction problem (CSP) Objective:

More information

Heaps and Priority Queues

Heaps and Priority Queues Heaps and Priority Queues Motivation Situations where one has to choose the next most important from a collection. Examples: patients in an emergency room, scheduling programs in a multi-tasking OS. Need

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 2017 Soleymani Artificial Intelligence:

More information

8: Splay Trees. Move-to-Front Heuristic. Splaying. Splay(12) CSE326 Spring April 16, Search for Pebbles: Move found item to front of list

8: Splay Trees. Move-to-Front Heuristic. Splaying. Splay(12) CSE326 Spring April 16, Search for Pebbles: Move found item to front of list : Splay Trees SE Spring 00 pril, 00 Move-to-Front Heuristic Search for ebbles: Fred Wilma ebbles ino Fred Wilma ino ebbles Move found item to front of list Frequently searched items will move to start

More information

Turing Machine Variants. Sipser pages

Turing Machine Variants. Sipser pages Turing Machine Variants Sipser pages 148-154 Marking symbols It is often convenient to have the Turing machine leave a symbol on the tape but to mark it in some way 1 1 0 2 B B B B B B B State = 1 1 1

More information

Final. CS 188 Fall Introduction to Artificial Intelligence

Final. CS 188 Fall Introduction to Artificial Intelligence CS 188 Fall 2012 Introduction to Artificial Intelligence Final You have approximately 3 hours. The exam is closed book, closed notes except your three one-page crib sheets. Please use non-programmable

More information

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence Adversarial Search II Instructor: Anca Dragan University of California, Berkeley [These slides adapted from Dan Klein and Pieter Abbeel] Minimax Example 3 12 8 2 4 6 14

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 8 Greedy Algorithms V Huffman Codes Adam Smith Review Questions Let G be a connected undirected graph with distinct edge weights. Answer true or false: Let e be the

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science ALGORITHMS FOR INFERENCE Fall 2014

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science ALGORITHMS FOR INFERENCE Fall 2014 MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science 6.438 ALGORITHMS FOR INFERENCE Fall 2014 Quiz 2 Wednesday, December 10, 2014 7:00pm 10:00pm This is a closed

More information

For the case of S = 1/2 the eigenfunctions of the z component of S are φ 1/2 and φ 1/2

For the case of S = 1/2 the eigenfunctions of the z component of S are φ 1/2 and φ 1/2 MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department 8.044 Statistical Physics I Spring Term 03 Excited State Helium, He An Example of Quantum Statistics in a Two Particle System By definition He has

More information

Tute 10. Liam O'Connor. May 23, 2017

Tute 10. Liam O'Connor. May 23, 2017 Tute 10 Liam O'Connor May 23, 2017 proc Search(value g : G, value s : V g, value k : K, result v : T, result f : B) Where a graph g : G is dened as a 4-tuple (V, Γ, κ, λ) containing a set of vertices V,

More information

Chapter 5 Data Structures Algorithm Theory WS 2017/18 Fabian Kuhn

Chapter 5 Data Structures Algorithm Theory WS 2017/18 Fabian Kuhn Chapter 5 Data Structures Algorithm Theory WS 2017/18 Fabian Kuhn Priority Queue / Heap Stores (key,data) pairs (like dictionary) But, different set of operations: Initialize-Heap: creates new empty heap

More information

CS213d Data Structures and Algorithms

CS213d Data Structures and Algorithms CS21d Data Structures and Algorithms Heaps and their Applications Milind Sohoni IIT Bombay and IIT Dharwad March 22, 2017 1 / 18 What did I see today? March 22, 2017 2 / 18 Heap-Trees A tree T of height

More information

Data Structures for Disjoint Sets

Data Structures for Disjoint Sets Data Structures for Disjoint Sets Advanced Data Structures and Algorithms (CLRS, Chapter 2) James Worrell Oxford University Computing Laboratory, UK HT 200 Disjoint-set data structures Also known as union

More information

Principles of AI Planning

Principles of AI Planning Principles of 5. Planning as search: progression and regression Malte Helmert and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 4th, 2010 Planning as (classical) search Introduction Classification

More information

CISC681/481 AI Midterm Exam

CISC681/481 AI Midterm Exam CISC681/481 AI Midterm Exam You have from 12:30 to 1:45pm to complete the following four questions. Use the back of the page if you need more space. Good luck! 1. Definitions (3 points each) Define the

More information

The Greedy Method. Design and analysis of algorithms Cs The Greedy Method

The Greedy Method. Design and analysis of algorithms Cs The Greedy Method Design and analysis of algorithms Cs 3400 The Greedy Method 1 Outline and Reading The Greedy Method Technique Fractional Knapsack Problem Task Scheduling 2 The Greedy Method Technique The greedy method

More information

CSE 591 Foundations of Algorithms Homework 4 Sample Solution Outlines. Problem 1

CSE 591 Foundations of Algorithms Homework 4 Sample Solution Outlines. Problem 1 CSE 591 Foundations of Algorithms Homework 4 Sample Solution Outlines Problem 1 (a) Consider the situation in the figure, every edge has the same weight and V = n = 2k + 2. Easy to check, every simple

More information

CS 151. Red Black Trees & Structural Induction. Thursday, November 1, 12

CS 151. Red Black Trees & Structural Induction. Thursday, November 1, 12 CS 151 Red Black Trees & Structural Induction 1 Announcements Majors fair tonight 4:30-6:30pm in the Root Room in Carnegie. Come and find out about the CS major, or some other major. Winter Term in CS

More information

Structural Analysis. Method of Joints. Method of Pins

Structural Analysis. Method of Joints. Method of Pins Structural nalysis / Method of Pins I m reading a book about an1gravity. It s impossible to put down. Pop Quiz What is today s date? 2 1 Trusses Trusses are common means of transferring loads from their

More information

Deterministic Planning and State-space Search. Erez Karpas

Deterministic Planning and State-space Search. Erez Karpas Planning and Search IE&M Technion to our Problem-solving agents Restricted form of general agent def Simple-Problem-Solving-Agent (problem): state, some description of the current world state seq, an action

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

! Insert. ! Remove largest. ! Copy. ! Create. ! Destroy. ! Test if empty. ! Fraud detection: isolate $$ transactions.

! Insert. ! Remove largest. ! Copy. ! Create. ! Destroy. ! Test if empty. ! Fraud detection: isolate $$ transactions. Priority Queues Priority Queues Data. Items that can be compared. Basic operations.! Insert.! Remove largest. defining ops! Copy.! Create.! Destroy.! Test if empty. generic ops Reference: Chapter 6, Algorithms

More information

Essentials of the A* Algorithm

Essentials of the A* Algorithm Essentials of the A* Algorithm Keith L. Downing Search problems are ubiquitous in Artificial Intelligence (AI), and they are often so complex that standard brute-force methods (i.e. those that try every

More information

CS 188: Artificial Intelligence Spring 2007

CS 188: Artificial Intelligence Spring 2007 CS 188: Artificil Intelligence Spring 2007 Lecture 3: Queue-Bsed Serch 1/23/2007 Srini Nrynn UC Berkeley Mny slides over the course dpted from Dn Klein, Sturt Russell or Andrew Moore Announcements Assignment

More information

Comparison of Bayesian and Frequentist Inference

Comparison of Bayesian and Frequentist Inference Comparison of Bayesian and Frequentist Inference 18.05 Spring 2014 First discuss last class 19 board question, January 1, 2017 1 /10 Compare Bayesian inference Uses priors Logically impeccable Probabilities

More information

This lecture is a review for the exam. The majority of the exam is on what we ve learned about rectangular matrices.

This lecture is a review for the exam. The majority of the exam is on what we ve learned about rectangular matrices. Exam review This lecture is a review for the exam. The majority of the exam is on what we ve learned about rectangular matrices. Sample question Suppose u, v and w are non-zero vectors in R 7. They span

More information

4.8 Huffman Codes. These lecture slides are supplied by Mathijs de Weerd

4.8 Huffman Codes. These lecture slides are supplied by Mathijs de Weerd 4.8 Huffman Codes These lecture slides are supplied by Mathijs de Weerd Data Compression Q. Given a text that uses 32 symbols (26 different letters, space, and some punctuation characters), how can we

More information

Principles of AI Planning

Principles of AI Planning Principles of AI Planning 5. Planning as search: progression and regression Albert-Ludwigs-Universität Freiburg Bernhard Nebel and Robert Mattmüller October 30th, 2013 Introduction Classification Planning

More information

Big Bang, Black Holes, No Math

Big Bang, Black Holes, No Math ASTR/PHYS 109 Dr. David Toback Lectures 21 and 22 1 Was Due Today L22 Reading: (BBBHNM Unit 3) Pre-Lecture Reading Questions (PLRQ) Unit 3: Let us know if you think you were misgraded Unit 3 Revision (if

More information

Is the equal branch length model a parsimony model?

Is the equal branch length model a parsimony model? Table 1: n approximation of the probability of data patterns on the tree shown in figure?? made by dropping terms that do not have the minimal exponent for p. Terms that were dropped are shown in red;

More information

1 Trees. Listing 1: Node with two child reference. public class ptwochildnode { protected Object data ; protected ptwochildnode l e f t, r i g h t ;

1 Trees. Listing 1: Node with two child reference. public class ptwochildnode { protected Object data ; protected ptwochildnode l e f t, r i g h t ; 1 Trees The next major set of data structures belongs to what s called Trees. They are called that, because if you try to visualize the structure, it kind of looks like a tree (root, branches, and leafs).

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

1 Circuits (20 points)

1 Circuits (20 points) 6.01 Midterm Exam 2 Spring 09 2 1 Circuits (20 points) Consider the following circuit where the resistance R is in the range 0 R. I 1 3 Ω 1Ω V 1 6 V + + R 5 V Part a. Determine I 1 if R = 0Ω. I 1 = 2 A

More information

Greedy. Outline CS141. Stefano Lonardi, UCR 1. Activity selection Fractional knapsack Huffman encoding Later:

Greedy. Outline CS141. Stefano Lonardi, UCR 1. Activity selection Fractional knapsack Huffman encoding Later: October 5, 017 Greedy Chapters 5 of Dasgupta et al. 1 Activity selection Fractional knapsack Huffman encoding Later: Outline Dijkstra (single source shortest path) Prim and Kruskal (minimum spanning tree)

More information

Module 9: Tries and String Matching

Module 9: Tries and String Matching Module 9: Tries and String Matching CS 240 - Data Structures and Data Management Sajed Haque Veronika Irvine Taylor Smith Based on lecture notes by many previous cs240 instructors David R. Cheriton School

More information

15.082J & 6.855J & ESD.78J. Algorithm Analysis

15.082J & 6.855J & ESD.78J. Algorithm Analysis 15.082J & 6.855J & ESD.78J Algorithm Analysis 15.082 Overview of subject Importance of Algorithm Analysis Importance of homework Midterms Moving forward 2 Overview of lecture Proof techniques Proof by

More information

Computing Static Single Assignment (SSA) Form

Computing Static Single Assignment (SSA) Form Computing Static Single Assignment (SSA) Form Overview What is SSA? Advantages of SSA over use-def chains Flavors of SSA Dominance frontiers revisited Inserting φ-nodes Renaming the variables Translating

More information

6.01 Midterm 2 Spring 2011

6.01 Midterm 2 Spring 2011 Name: Solutions Section: These solutions do not apply for the conflict exam. Enter all answers in the boxes provided. Clearly written work will be graded for partial credit. During the exam you may: read

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

DATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018

DATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018 DATA620006 魏忠钰 Serch I Mrch 7 th, 2018 Outline Serch Problems Uninformed Serch Depth-First Serch Bredth-First Serch Uniform-Cost Serch Rel world tsk - Pc-mn Serch problems A serch problem consists of:

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

CS 662 Sample Midterm

CS 662 Sample Midterm Name: 1 True/False, plus corrections CS 662 Sample Midterm 35 pts, 5 pts each Each of the following statements is either true or false. If it is true, mark it true. If it is false, correct the statement

More information

CS 220: Discrete Structures and their Applications. Mathematical Induction in zybooks

CS 220: Discrete Structures and their Applications. Mathematical Induction in zybooks CS 220: Discrete Structures and their Applications Mathematical Induction 6.4 6.6 in zybooks Why induction? Prove algorithm correctness (CS320 is full of it) The inductive proof will sometimes point out

More information

CS Data Structures and Algorithm Analysis

CS Data Structures and Algorithm Analysis CS 483 - Data Structures and Algorithm Analysis Lecture VII: Chapter 6, part 2 R. Paul Wiegand George Mason University, Department of Computer Science March 22, 2006 Outline 1 Balanced Trees 2 Heaps &

More information

Top-Down K-Best A Parsing

Top-Down K-Best A Parsing Top-Down K-Best A Parsing Adam Pauls and Dan Klein Computer Science Division University of California at Berkeley {adpauls,klein}@cs.berkeley.edu Chris Quirk Microsoft Research Redmond, WA, 98052 chrisq@microsoft.com

More information

CS Algorithms and Complexity

CS Algorithms and Complexity CS 50 - Algorithms and Complexity Linear Programming, the Simplex Method, and Hard Problems Sean Anderson 2/15/18 Portland State University Table of contents 1. The Simplex Method 2. The Graph Problem

More information