Introduction to Intelligent Systems
|
|
- Charleen Shields
- 7 years ago
- Views:
Transcription
1 Problem Solving by Search Objectives Problem solving agent Tree search Uninformed search strategies: BFS, DFS, DLS, and IDS Heuristic search strategies: GBFS and A* Reference Russell & Norvig: 3 and 4.1 Goals Goals Agent s task at hand can often be specified in terms of a goal to be satisfied. A goal is a set of desirable env states (goal states). Examples of goals Goal formulation Agent formulates its goal based on the current state and its performance measure. Goals help agent organize behavior by limiting the objectives to be achieved. Y. Xiang, CIS 3700, Introduction to Intelligent Systems 1 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 2 Problem Formulation and Search Problem formulation is the process of deciding what states and actions to consider, given a goal. Ex Storage in an open-floor warehouse Ex Delivery in Reynolds building Search Agent needs to find out which sequence of actions will get it from the current state to a goal state. Search is the process of looking for such a sequence. Y. Xiang, CIS 3700, Introduction to Intelligent Systems 3 Problem Solving Agents simpleproblemsolvingagent(percept) { static actionseq=, state=initstate, goal=null, problemform=null; state = updatestate(state, percept); if actionseq =, do goal = formulategoal(state); problemform = formulateproblem(state, goal); actionseq = Search(problemForm); action = getfirst(actionseq); actionseq = getrest(actionseq); return action; } Y. Xiang, CIS 3700, Introduction to Intelligent Systems 4 1
2 Environmental Assumptions Assumptions on environment Observable initial state Deterministic Static Discrete Consequence Open-loop system An example No surprises Well-defined Problems in Search Problem definition Initial state Possible actions in terms of a Successor function Successor(state) maps a state to a set of (action, state ) pairs. State space: the set of states reachable from initial state Goal test Path cost (in terms of step cost) A solution is a path from initial state to a goal state. What else are contained in a solution (implicitly)? An optimal solution has the lowest path cost among all solutions. Y. Xiang, CIS 3700, Introduction to Intelligent Systems 5 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 6 Type of Problems Toy problems A concise, exact description can be given. Performance of algorithms can be easily compared. Ex Simple vacuum cleaner, 8-puzzle, etc. Real-world problems Solutions affect people s life. There is no single, precise, and agreed-upon description. Ex Unmanned vehicles, airline scheduling, medical diagnosis, etc. A potential confusion Y. Xiang, CIS 3700, Introduction to Intelligent Systems 7 Search Tree Search tree Root: The initial env state Expand: Apply Successor() to a node to generate its child nodes. Fringe: The set of all leaf nodes Relation to state space A search tree is superimposed over the state space. It may not include all states, unless fully expanded. A given state may reappear in a search tree. Search strategy: Given the current search tree, which leaf node should be expanded next? 8 2
3 The Idea of Tree Search treesearch(problem, strategy) { set root of search tree to initial state of problem; loop find a leaf x to expand according to strategy; if no qualified leaf is found, return failure; if x corresponds to a goal state, return the corresponding solution; else expand x; add children of x to the search tree; } Y. Xiang, CIS 3700, Introduction to Intelligent Systems 9 River-Crossing Problem A farmer, with a wolf, a sheep, and a cabbage, needs to cross a river using a boat. The boat can carry farmer plus only one other thing. Wolf and sheep cannot be left in the same bank unattended, nor can sheep and cabbage. How can farmer cross river with belongings intact? Step 1: Identify factors affecting rational behavior. Step 2: Identify initial state and goal. Step 3: Find action sequence by treesearch(). Y. Xiang, CIS 3700, Introduction to Intelligent Systems 10 Data Structure for Node on Search Tree Components in node data structure 1. Corresponding env state 2. Parent node on search tree 3. Action that generated this node from its parent 4. Depth: Length of the path from root 5. Path cost from root to the node Data structure of fringe Set Queue Y. Xiang, CIS 3700, Introduction to Intelligent Systems 11 Algorithm for Tree Search treesearch(problem, strategy) { // fringe as queue tree.makerootnode(problem.initialstate); fringe.insert(problem.initialstate); loop if ( fringe.isempty() ) return failure; node = fringe.removefirst(); if ( problem.isgoal(node.getstate()) ) return node.getsolution(); successors = node.expand(problem); tree.addleaves(successors); fringe.insert(successors, strategy); } Y. Xiang, CIS 3700, Introduction to Intelligent Systems 12 3
4 expand(problem) { // method in class Node successors = ; actionstatepairs = problem.successor(getstate()); for each p in actionstatepairs, do n = new Node(); n.state = p.state; n.action = p.action; n.parent = this; n.depth = this.depth + 1; n.pathcost = this.pathcost + getstepcost(p.action); successors.add(n); return successors; } 13 When Does Agent Test For Goal? Test-Before-Expansion vs Test-At-Expansion Examples of alternative approaches Algorithm comparison Difference in complexity The default Usage of phrases relative to tree nodes Visit Expansion Generation Y. Xiang, CIS 3700, Introduction to Intelligent Systems 14 Measure Problem Solving Performance 1. Completeness: A search algorithm is complete if it guarantees to find a solution when one exists. 2. Optimality: A search algorithm is optimal if it guarantees to find the optimal solution. 3. Time complexity: Time taken to find a solution Measured by max # of nodes generated 4. Space complexity: Memory needed to perform search Measured by max number of nodes stored Efficiency of solution vs efficiency of search Measure Size of Problem Why do we measure the size of a problem? Size of a search problem can be measured by the following parameters of the fully expanded search tree. Branching factor: b Max number of successors of any node Depth of the shallowest goal node: d Max length of any path: m Y. Xiang, CIS 3700, Introduction to Intelligent Systems 15 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 16 4
5 Search Strategies Search strategy determines the problem solving performance for a given problem. Depending on the amount of agent knowledge, search strategies can be grouped into two broad classes: Uninformed (blind) search strategies Agent has no additional information about states beyond the problem definition. Informed (heuristic) search strategies Agent has knowledge about whether one non-goal state is more promising than another. Breadth-First Search (BFS) BFS strategy Each node at a given depth is expanded before any node at the next level is expanded. Ex 8-puzzle Can be implemented with a FIFO queue for fringe in TreeSearch(). What should fringe.insert(successors, BFS) do? Y. Xiang, CIS 3700, Introduction to Intelligent Systems 17 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 18 Properties of BFS Is BFS complete? Is BFS optimal? What is its time complexity? What is the space complexity? Depth-First Search (DFS) DFS strategy Visit the deepest node in the fringe An example Can be implemented with a LIFO queue (stake) Is DFS complete? Is DFS optimal? What is the time complexity? Y. Xiang, CIS 3700, Introduction to Intelligent Systems 19 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 20 5
6 Space Complexity of DFS A node can be removed from memory, as soon as all its descendants have been visited. Need to store only a single path from root to a leaf, and unvisited siblings for each node on the path Space complexity How many nodes must be stored in the worst case? Y. Xiang, CIS 3700, Introduction to Intelligent Systems 21 Depth-Limited Search (DLS) Motivation: Avoid being stuck in unbounded branches DLS strategy Depth-first search with a depth limit l Nodes at depth l are treated as having no successors. Is DLS guaranteed to terminate? Space complexity Time complexity Is DLS complete? Is DLS optimal? Summery 22 Iterative Deepening Search (IDS) Motivation: Combine merits from BFS and DFS IDS strategy: Perform DLS with increasing depth limit l = 0, 1, 2,, until a goal node is found. Visiting node x: if x is a goal node, return solution; else if x.depth < l, expand x; else remove x from memory; if x is the last child, rm y=x.parent from memory; if y is the last child, rm z=y.parent from memory; Properties of IDS Is IDS complete? Is IDS optimal? What is its space complexity? What is its time complexity? An example 23 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 24 6
7 Avoiding Repeated States Causes of repeated states Reversible actions Multiple paths to reach a state from the initial state Tradeoff in checking and deleting repeated nodes: Save time & space for processing repeated subtrees. Need space to store all uniquely generated nodes, and time to check each newly generated node against them. Heuristic Search Strategies General approach: Best-First Search Problem-specific knowledge on the promise of a node n for leading to a goal is expressed with an evaluation function f(n). Expand the leaf with the best f(.) value Convention: The lower the f(.) value, the better. Implementation: Maintain fringe as a queue sorted in ascending order of f(.) values If f(n) is accurate, what properties does it have? Can we always find accurate f(n)? Y. Xiang, CIS 3700, Introduction to Intelligent Systems 25 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 26 Greedy Best-First Search (GBFS) Greedy Best-First Search Define a heuristic function h(n): Estimated cost of the cheapest path from node n to a goal node What should the value of h(n) be if n is a goal node? Define f(n) = h(n) Ex Routing from city A to city B with straight-line distance heuristics Y. Xiang, CIS 3700, Introduction to Intelligent Systems Area Map A T 71 Z 111 O 140 L 70 M 75 D 151 S 80 R C F P A 366 B 0 C 160 D 242 E 161 F 176 G 77 H Y. Xiang, CIS 3700, Introduction to Intelligent Systems 28 G B 90 N Straight-line distance to B U I V H I 226 L 244 M 241 N 234 O 380 P 100 R 193 S 253 T 329 U 80 V 199 Z E 7
8 Evaluation of GBFS Is GBFS optimal? Is GBFS complete? Ex Routing from city I to F Time complexity GBFS behaves similarly to DFS. Space complexity Comparison with DFS Y. Xiang, CIS 3700, Introduction to Intelligent Systems 29 A* Tree Search A* Tree Search Idea: Combine the cost g(n) from root to n, with the cost estimate h(n) from n to a goal node. Define f(n) = g(n)+h(n). What is its interpretation? Ex Routing from city A to B Issue of optimality None of the blind search strategies is optimal. Admissible heuristic Heuristic function h(n) is admissible if h(n) c(n), where c(n) is the minimum path cost from n to a goal node. What is the implication to f(n)? Y. Xiang, CIS 3700, Introduction to Intelligent Systems 30 Optimality of A* Tree Search Theorem: A* is optimal, if h(n) is admissible. Proof idea: 1) C*: cost of optimal solution t : a sub-optimal goal in the current fringe 2) Claim: f(t ) > C* 3) n: a fringe node on the optimal solution path 4) Claim: f(n) C* 5) Claim: t cannot be expanded before n 6) The first goal node visited must be the optimal. Monotonicity of Heuristic Function Monotonic (consistent) heuristic A heuristic function h(n) is monotonic, if for each node n and each child n of n, the following holds: h(n) c(n,n ) + h(n ), [triangle inequality] where c(n,n ) is the step cost from n to n. Ex Is straight-line distance heuristics monotonic? Ex An non-monotonic h(n) Comparison with blind search strategies Y. Xiang, CIS 3700, Introduction to Intelligent Systems 31 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 32 8
9 Completeness of A* Tree Search Proposition: If h(n) is monotonic, then f(n ) f(n), where n is a child node of n. Observation: If h(n) is monotonic, then A* expands nodes at concentric contours of non-decreasing f(n) values in state space. Theorem: A* tree search is complete, if 1. h(n) is monotonic, 2. each step cost is positive, and 3. the branching factor b is finite. Complexity Time complexity For most problems of interest to AI, the number of nodes within the search space of goal contour is exponential in the length of the solution. Space complexity A* needs to store all nodes expanded. Hence, space and time complexity are the same. Y. Xiang, CIS 3700, Introduction to Intelligent Systems 33 Y. Xiang, CIS 3700, Introduction to Intelligent Systems 34 9
AI: A Modern Approach, Chpts. 3-4 Russell and Norvig
AI: A Modern Approach, Chpts. 3-4 Russell and Norvig Sequential Decision Making in Robotics CS 599 Geoffrey Hollinger and Gaurav Sukhatme (Some slide content from Stuart Russell and HweeTou Ng) Spring,
More informationMeasuring the Performance of an Agent
25 Measuring the Performance of an Agent The rational agent that we are aiming at should be successful in the task it is performing To assess the success we need to have a performance measure What is rational
More informationInformed search algorithms. Chapter 4, Sections 1 2 1
Informed search algorithms Chapter 4, Sections 1 2 Chapter 4, Sections 1 2 1 Outline Best-first search A search Heuristics Chapter 4, Sections 1 2 2 Review: Tree search function Tree-Search( problem, fringe)
More informationProblem solving and search
Problem solving and search hapter 3 hapter 3 1 eminders ssignment 0 due 5pm today ssignment 1 posted, due 2/9 ection 105 will move to 9-10am starting next week hapter 3 2 Outline Problem-solving agents
More informationCS91.543 MidTerm Exam 4/1/2004 Name: KEY. Page Max Score 1 18 2 11 3 30 4 15 5 45 6 20 Total 139
CS91.543 MidTerm Exam 4/1/2004 Name: KEY Page Max Score 1 18 2 11 3 30 4 15 5 45 6 20 Total 139 % INTRODUCTION, AI HISTORY AND AGENTS 1. [4 pts. ea.] Briefly describe the following important AI programs.
More informationSOLVING PROBLEMS BY SEARCHING
3 SOLVING PROBLEMS 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. PROBLEM SOLVING AGENT The simplest agents discussed in
More informationSearch methods motivation 1
Suppose you are an independent software developer, and your software package Windows Defeater R, widely available on sourceforge under a GNU GPL license, is getting an international attention and acclaim.
More informationApproximation Algorithms
Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms
More informationBinary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R
Binary Search Trees A Generic Tree Nodes in a binary search tree ( B-S-T) are of the form P parent Key A Satellite data L R B C D E F G H I J The B-S-T has a root node which is the only node whose parent
More informationSEARCHING AND KNOWLEDGE REPRESENTATION. Angel Garrido
Acta Universitatis Apulensis ISSN: 1582-5329 No. 30/2012 pp. 147-152 SEARCHING AND KNOWLEDGE REPRESENTATION Angel Garrido ABSTRACT. The procedures of searching of solutions of problems, in Artificial Intelligence
More informationHome Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit
Data Structures Page 1 of 24 A.1. Arrays (Vectors) n-element vector start address + ielementsize 0 +1 +2 +3 +4... +n-1 start address continuous memory block static, if size is known at compile time dynamic,
More informationBinary Heaps. CSE 373 Data Structures
Binary Heaps CSE Data Structures Readings Chapter Section. Binary Heaps BST implementation of a Priority Queue Worst case (degenerate tree) FindMin, DeleteMin and Insert (k) are all O(n) Best case (completely
More informationClassification/Decision Trees (II)
Classification/Decision Trees (II) Department of Statistics The Pennsylvania State University Email: jiali@stat.psu.edu Right Sized Trees Let the expected misclassification rate of a tree T be R (T ).
More informationAn Introduction to The A* Algorithm
An Introduction to The A* Algorithm Introduction The A* (A-Star) algorithm depicts one of the most popular AI methods used to identify the shortest path between 2 locations in a mapped area. The A* algorithm
More informationBinary Heap Algorithms
CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn G. Chappell
More informationIE 680 Special Topics in Production Systems: Networks, Routing and Logistics*
IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* Rakesh Nagi Department of Industrial Engineering University at Buffalo (SUNY) *Lecture notes from Network Flows by Ahuja, Magnanti
More informationCourse Outline Department of Computing Science Faculty of Science. COMP 3710-3 Applied Artificial Intelligence (3,1,0) Fall 2015
Course Outline Department of Computing Science Faculty of Science COMP 710 - Applied Artificial Intelligence (,1,0) Fall 2015 Instructor: Office: Phone/Voice Mail: E-Mail: Course Description : Students
More informationCS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team
CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A
More informationAnalysis of Algorithms, I
Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications
More informationFrom Last Time: Remove (Delete) Operation
CSE 32 Lecture : More on Search Trees Today s Topics: Lazy Operations Run Time Analysis of Binary Search Tree Operations Balanced Search Trees AVL Trees and Rotations Covered in Chapter of the text From
More informationThe following themes form the major topics of this chapter: The terms and concepts related to trees (Section 5.2).
CHAPTER 5 The Tree Data Model There are many situations in which information has a hierarchical or nested structure like that found in family trees or organization charts. The abstraction that models hierarchical
More informationFull and Complete Binary Trees
Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full
More informationAnalysis of Algorithms I: Binary Search Trees
Analysis of Algorithms I: Binary Search Trees Xi Chen Columbia University Hash table: A data structure that maintains a subset of keys from a universe set U = {0, 1,..., p 1} and supports all three dictionary
More informationPrevious Lectures. B-Trees. External storage. Two types of memory. B-trees. Main principles
B-Trees Algorithms and data structures for external memory as opposed to the main memory B-Trees Previous Lectures Height balanced binary search trees: AVL trees, red-black trees. Multiway search trees:
More informationSymbol Tables. Introduction
Symbol Tables Introduction A compiler needs to collect and use information about the names appearing in the source program. This information is entered into a data structure called a symbol table. The
More informationBinary Trees and Huffman Encoding Binary Search Trees
Binary Trees and Huffman Encoding Binary Search Trees Computer Science E119 Harvard Extension School Fall 2012 David G. Sullivan, Ph.D. Motivation: Maintaining a Sorted Collection of Data A data dictionary
More informationSequential Data Structures
Sequential Data Structures In this lecture we introduce the basic data structures for storing sequences of objects. These data structures are based on arrays and linked lists, which you met in first year
More informationIncremental Routing Algorithms For Dynamic Transportation Networks
UCGE Reports Number 20238 Department of Geomatics Engineering Incremental Routing Algorithms For Dynamic Transportation Networks (URL: http://www.geomatics.ucalgary.ca/research/publications/gradtheses.html)
More informationB-Trees. Algorithms and data structures for external memory as opposed to the main memory B-Trees. B -trees
B-Trees Algorithms and data structures for external memory as opposed to the main memory B-Trees Previous Lectures Height balanced binary search trees: AVL trees, red-black trees. Multiway search trees:
More informationA binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property
CmSc 250 Intro to Algorithms Chapter 6. Transform and Conquer Binary Heaps 1. Definition A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called
More informationChapter 13: Binary and Mixed-Integer Programming
Chapter 3: Binary and Mixed-Integer Programming The general branch and bound approach described in the previous chapter can be customized for special situations. This chapter addresses two special situations:
More informationA Systematic Approach to Model-Guided Empirical Search for Memory Hierarchy Optimization
A Systematic Approach to Model-Guided Empirical Search for Memory Hierarchy Optimization Chun Chen, Jacqueline Chame, Mary Hall, and Kristina Lerman University of Southern California/Information Sciences
More informationAlgorithms Chapter 12 Binary Search Trees
Algorithms Chapter 1 Binary Search Trees Outline Assistant Professor: Ching Chi Lin 林 清 池 助 理 教 授 chingchi.lin@gmail.com Department of Computer Science and Engineering National Taiwan Ocean University
More informationBinary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *
Binary Heaps A binary heap is another data structure. It implements a priority queue. Priority Queue has the following operations: isempty add (with priority) remove (highest priority) peek (at highest
More informationNetwork (Tree) Topology Inference Based on Prüfer Sequence
Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 vanniarajanc@hcl.in,
More informationLearning Outcomes. COMP202 Complexity of Algorithms. Binary Search Trees and Other Search Trees
Learning Outcomes COMP202 Complexity of Algorithms Binary Search Trees and Other Search Trees [See relevant sections in chapters 2 and 3 in Goodrich and Tamassia.] At the conclusion of this set of lecture
More informationBig Data and Scripting. Part 4: Memory Hierarchies
1, Big Data and Scripting Part 4: Memory Hierarchies 2, Model and Definitions memory size: M machine words total storage (on disk) of N elements (N is very large) disk size unlimited (for our considerations)
More informationCPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313]
CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313] File Structures A file is a collection of data stored on mass storage (e.g., disk or tape) Why on mass storage? too big to fit
More informationNear Optimal Solutions
Near Optimal Solutions Many important optimization problems are lacking efficient solutions. NP-Complete problems unlikely to have polynomial time solutions. Good heuristics important for such problems.
More informationAlgorithms and Data Structures
Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. Ralf-Peter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2
More informationWhy? A central concept in Computer Science. Algorithms are ubiquitous.
Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online
More informationY. Xiang, Constraint Satisfaction Problems
Constraint Satisfaction Problems Objectives Constraint satisfaction problems Backtracking Iterative improvement Constraint propagation Reference Russell & Norvig: Chapter 5. 1 Constraints Constraints are
More informationAlok Gupta. Dmitry Zhdanov
RESEARCH ARTICLE GROWTH AND SUSTAINABILITY OF MANAGED SECURITY SERVICES NETWORKS: AN ECONOMIC PERSPECTIVE Alok Gupta Department of Information and Decision Sciences, Carlson School of Management, University
More informationData Structures Fibonacci Heaps, Amortized Analysis
Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:
More informationCurriculum Map. Discipline: Computer Science Course: C++
Curriculum Map Discipline: Computer Science Course: C++ August/September: How can computer programs make problem solving easier and more efficient? In what order does a computer execute the lines of code
More informationSocial Media Mining. Graph Essentials
Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures
More informationDecision Trees from large Databases: SLIQ
Decision Trees from large Databases: SLIQ C4.5 often iterates over the training set How often? If the training set does not fit into main memory, swapping makes C4.5 unpractical! SLIQ: Sort the values
More informationOperations: search;; min;; max;; predecessor;; successor. Time O(h) with h height of the tree (more on later).
Binary search tree Operations: search;; min;; max;; predecessor;; successor. Time O(h) with h height of the tree (more on later). Data strutcure fields usually include for a given node x, the following
More informationAlgorithms and Data S tructures Structures Stack, Queues, and Applications Applications Ulf Leser
Algorithms and Data Structures Stack, Queues, and Applications Ulf Leser Content of this Lecture Stacks and Queues Tree Traversal Towers of Hanoi Ulf Leser: Alg&DS, Summer semester 2011 2 Stacks and Queues
More information6 March 2007 1. Array Implementation of Binary Trees
Heaps CSE 0 Winter 00 March 00 1 Array Implementation of Binary Trees Each node v is stored at index i defined as follows: If v is the root, i = 1 The left child of v is in position i The right child of
More informationDEVELOPMENT OF A VULNERABILITY ASSESSMENT CODE FOR A PHYSICAL PROTECTION SYSTEM: SYSTEMATIC ANALYSIS OF PHYSICAL PROTECTION EFFECTIVENESS (SAPE)
DEVELOPMENT OF A VULNERABILITY ASSESSMENT CODE FOR A PHYSICAL PROTECTION SYSTEM: SYSTEMATIC ANALYSIS OF PHYSICAL PROTECTION EFFECTIVENESS (SAPE) SUNG SOON JANG *, SUNG-WOO KWAK, HOSIK YOO, JUNG-SOO KIM
More informationOnline Planning Algorithms for POMDPs
Journal of Artificial Intelligence Research 32 (2008) 663-704 Submitted 03/08; published 07/08 Online Planning Algorithms for POMDPs Stéphane Ross Joelle Pineau School of Computer Science McGill University,
More informationApplied Algorithm Design Lecture 5
Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design
More informationHow To Create A Tree From A Tree In Runtime (For A Tree)
Binary Search Trees < 6 2 > = 1 4 8 9 Binary Search Trees 1 Binary Search Trees A binary search tree is a binary tree storing keyvalue entries at its internal nodes and satisfying the following property:
More informationChapter 6. Decoding. Statistical Machine Translation
Chapter 6 Decoding Statistical Machine Translation Decoding We have a mathematical model for translation p(e f) Task of decoding: find the translation e best with highest probability Two types of error
More informationGRAPH THEORY LECTURE 4: TREES
GRAPH THEORY LECTURE 4: TREES Abstract. 3.1 presents some standard characterizations and properties of trees. 3.2 presents several different types of trees. 3.7 develops a counting method based on a bijection
More informationGENERATING THE FIBONACCI CHAIN IN O(log n) SPACE AND O(n) TIME J. Patera
ˆ ˆŠ Œ ˆ ˆ Œ ƒ Ÿ 2002.. 33.. 7 Š 539.12.01 GENERATING THE FIBONACCI CHAIN IN O(log n) SPACE AND O(n) TIME J. Patera Department of Mathematics, Faculty of Nuclear Science and Physical Engineering, Czech
More information24. The Branch and Bound Method
24. The Branch and Bound Method It has serious practical consequences if it is known that a combinatorial problem is NP-complete. Then one can conclude according to the present state of science that no
More informationSmart Graphics: Methoden 3 Suche, Constraints
Smart Graphics: Methoden 3 Suche, Constraints Vorlesung Smart Graphics LMU München Medieninformatik Butz/Boring Smart Graphics SS2007 Methoden: Suche 2 Folie 1 Themen heute Suchverfahren Hillclimbing Simulated
More informationA binary search tree is a binary tree with a special property called the BST-property, which is given as follows:
Chapter 12: Binary Search Trees A binary search tree is a binary tree with a special property called the BST-property, which is given as follows: For all nodes x and y, if y belongs to the left subtree
More informationGuessing Game: NP-Complete?
Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple
More informationER E P M A S S I CONSTRUCTING A BINARY TREE EFFICIENTLYFROM ITS TRAVERSALS DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF TAMPERE REPORT A-1998-5
S I N S UN I ER E P S I T VER M A TA S CONSTRUCTING A BINARY TREE EFFICIENTLYFROM ITS TRAVERSALS DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF TAMPERE REPORT A-1998-5 UNIVERSITY OF TAMPERE DEPARTMENT OF
More informationINTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models
Integer Programming INTEGER PROGRAMMING In many problems the decision variables must have integer values. Example: assign people, machines, and vehicles to activities in integer quantities. If this is
More informationMining Social Network Graphs
Mining Social Network Graphs Debapriyo Majumdar Data Mining Fall 2014 Indian Statistical Institute Kolkata November 13, 17, 2014 Social Network No introduc+on required Really? We s7ll need to understand
More informationData Structure [Question Bank]
Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:
More informationDecision Making under Uncertainty
6.825 Techniques in Artificial Intelligence Decision Making under Uncertainty How to make one decision in the face of uncertainty Lecture 19 1 In the next two lectures, we ll look at the question of how
More informationGraph Theory Problems and Solutions
raph Theory Problems and Solutions Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is
More informationThe Goldberg Rao Algorithm for the Maximum Flow Problem
The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }
More informationThe Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,
The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints
More information1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.
1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated
More informationExam study sheet for CS2711. List of topics
Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure
More informationData Mining on Streams
Data Mining on Streams Using Decision Trees CS 536: Machine Learning Instructor: Michael Littman TA: Yihua Wu Outline Introduction to data streams Overview of traditional DT learning ALG DT learning ALGs
More informationCpt S 223. School of EECS, WSU
The Shortest Path Problem 1 Shortest-Path Algorithms Find the shortest path from point A to point B Shortest in time, distance, cost, Numerous applications Map navigation Flight itineraries Circuit wiring
More informationCSE 326: Data Structures B-Trees and B+ Trees
Announcements (4//08) CSE 26: Data Structures B-Trees and B+ Trees Brian Curless Spring 2008 Midterm on Friday Special office hour: 4:-5: Thursday in Jaech Gallery (6 th floor of CSE building) This is
More informationEuclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014
Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li Advised by: Dave Mount May 22, 2014 1 INTRODUCTION In this report we consider the implementation of an efficient
More informationBinary Search Trees CMPSC 122
Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than
More information! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.
Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of
More informationFairness in Routing and Load Balancing
Fairness in Routing and Load Balancing Jon Kleinberg Yuval Rabani Éva Tardos Abstract We consider the issue of network routing subject to explicit fairness conditions. The optimization of fairness criteria
More informationTUM INSTITUT FÜR INFORMATIK. Matching and Evaluation of Disjunctive Predicates for Data Stream Sharing TECHNISCHE UNIVERSITÄT MÜNCHEN
TUM INSTITUT FÜR INFORMATIK Matching and Evaluation of Disjunctive Predicates for Data Stream Sharing Richard Kuntschke Alfons Kemper ÀÁÂ ÃÄÅÆÇ TUM-I0615 August 06 TECHNISCHE UNIVERSITÄT MÜNCHEN TUM-INFO-08-I0615-100/1.-FI
More information1 Norms and Vector Spaces
008.10.07.01 1 Norms and Vector Spaces Suppose we have a complex vector space V. A norm is a function f : V R which satisfies (i) f(x) 0 for all x V (ii) f(x + y) f(x) + f(y) for all x,y V (iii) f(λx)
More informationAngelic Hierarchical Planning: Optimal and Online Algorithms (Revised)
Angelic Hierarchical Planning: Optimal and Online Algorithms (Revised) Bhaskara Marthi Stuart J. Russell Jason Wolfe Electrical Engineering and Computer Sciences University of California at Berkeley Technical
More informationOrdered Lists and Binary Trees
Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 6-0:
More information! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.
Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three
More informationCost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:
CSE341T 08/31/2015 Lecture 3 Cost Model: Work, Span and Parallelism In this lecture, we will look at how one analyze a parallel program written using Cilk Plus. When we analyze the cost of an algorithm
More informationBinary Search Trees 3/20/14
Binary Search Trees 3/0/4 Presentation for use ith the textbook Data Structures and Algorithms in Java, th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldasser, Wiley, 04 Binary Search Trees 4
More informationMathematics for Algorithm and System Analysis
Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface
More informationClass Notes CS 3137. 1 Creating and Using a Huffman Code. Ref: Weiss, page 433
Class Notes CS 3137 1 Creating and Using a Huffman Code. Ref: Weiss, page 433 1. FIXED LENGTH CODES: Codes are used to transmit characters over data links. You are probably aware of the ASCII code, a fixed-length
More informationXML Data Integration
XML Data Integration Lucja Kot Cornell University 11 November 2010 Lucja Kot (Cornell University) XML Data Integration 11 November 2010 1 / 42 Introduction Data Integration and Query Answering A data integration
More informationAny set with a (unique) η-representation is Σ 3, and any set with a strong η-representation is
η-representation OF SETS AND DEGREES KENNETH HARRIS Abstract. We show that a set has an η-representation in a linear order if and only if it is the range of a 0 -computable limitwise monotonic function.
More informationEfficiency of algorithms. Algorithms. Efficiency of algorithms. Binary search and linear search. Best, worst and average case.
Algorithms Efficiency of algorithms Computational resources: time and space Best, worst and average case performance How to compare algorithms: machine-independent measure of efficiency Growth rate Complexity
More informationClass notes Program Analysis course given by Prof. Mooly Sagiv Computer Science Department, Tel Aviv University second lecture 8/3/2007
Constant Propagation Class notes Program Analysis course given by Prof. Mooly Sagiv Computer Science Department, Tel Aviv University second lecture 8/3/2007 Osnat Minz and Mati Shomrat Introduction This
More informationSecurity-Aware Beacon Based Network Monitoring
Security-Aware Beacon Based Network Monitoring Masahiro Sasaki, Liang Zhao, Hiroshi Nagamochi Graduate School of Informatics, Kyoto University, Kyoto, Japan Email: {sasaki, liang, nag}@amp.i.kyoto-u.ac.jp
More informationData Mining for Knowledge Management. Classification
1 Data Mining for Knowledge Management Classification Themis Palpanas University of Trento http://disi.unitn.eu/~themis Data Mining for Knowledge Management 1 Thanks for slides to: Jiawei Han Eamonn Keogh
More informationData Structures and Algorithms(5)
Ming Zhang Data Structures and Algorithms Data Structures and Algorithms(5) Instructor: Ming Zhang Textbook Authors: Ming Zhang, Tengjiao Wang and Haiyan Zhao Higher Education Press, 2008.6 (the "Eleventh
More information2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]
Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)
More informationInternational Journal of Advanced Research in Computer Science and Software Engineering
Volume 3, Issue 7, July 23 ISSN: 2277 28X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Greedy Algorithm:
More informationModeling and Solving the Capacitated Vehicle Routing Problem on Trees
in The Vehicle Routing Problem: Latest Advances and New Challenges Modeling and Solving the Capacitated Vehicle Routing Problem on Trees Bala Chandran 1 and S. Raghavan 2 1 Department of Industrial Engineering
More informationTHE last two decades have witnessed an exponential
IEEE JSAC - SAMPLING 2006 1 Practical Beacon Placement for Link Monitoring Using Network Tomography Ritesh Kumar and Jasleen Kaur Abstract Recent interest in using tomography for network monitoring has
More informationCOMP3420: Advanced Databases and Data Mining. Classification and prediction: Introduction and Decision Tree Induction
COMP3420: Advanced Databases and Data Mining Classification and prediction: Introduction and Decision Tree Induction Lecture outline Classification versus prediction Classification A two step process Supervised
More informationData Structures and Data Manipulation
Data Structures and Data Manipulation What the Specification Says: Explain how static data structures may be used to implement dynamic data structures; Describe algorithms for the insertion, retrieval
More information