...3 I J Consider the graph above (not drawn to scale). Given the heuristic values for the distance to city F: h(A) = 5 h(B) = 3 h(C) = 6 h(D) = 3 h(E) = 2 h(F) = 0 h(G) = 7 h(H) = 8 h(I) = 29 h(J) = 9 h(K) = 8 Draw the search trees resulting from i) BFS can be performed on the graph ii) DFS iii) Uniform Cost iv) A* search on the graph with start node A. Q2) Consider the problem of finding a path in the grid shown below from the position s to the position g. A piece can move on the grid horizontally and vertically, one square at a time. No step may be made into a forbidden shaded area. 1. On the grid, number the nodes in the order in which they are removed from the frontier in a depth-first search from s to g, given that the order of the operators you will test is: up, left, right, then down. Assume there is a cycle check. 2. Number the nodes in order in which they are taken off the frontier for an A* search for the same graph. Manhattan distance should be used as the heuristic function. The Manhattan distance between two points is the distance in the x-direction plus the distance in the y-direction. It corresponds to the distance traveled along city streets arranged in a grid. For example, the Manhattan distance between g and s is 4. What is the path that is found? 3. Based on this experience, discuss which of the two algorithms is best suited for this problem. 4. Suppose that the graph extended infinitely in all directions...
Words: 758 - Pages: 4
...Here is a worked example and process for constructing a network diagram: Using this example: Activity Duration (days) Predecessor(s) A 5 --- B 2 --- C 4 A D 6 B E 3 C, D F 1 D Follow this sequence: 1. Construct the Network diagram. 2. Check the network diagram. 3. Add durations to the activities. 4. Identify all paths through the network. 5. Identify the critical path (CP) and scheduled duration. 6. Calculate slack times (float) for each activity. 1. Construct the Network diagram. Using the AIB method: Draw a box on the left labeled "Start" Add boxes to the right of this box for activities with no predecessors, in the example A, and B. Connect these boxes to the box labeled start, but not to each other! I always start with box A at the top, and others in sequence underneath, vertically. Add arrows to the end of the lines where they connect to the activity (A and B) boxes. (This is important for step 4). Draw a box to the right of activity A for any activities which list A as a predecessor. (C in our example). Connect this box to activity A, don't forget the arrow! Draw a box to the right of activity B for any activities which list B as a predecessor. (D in our example). Connect this box to activity B, don't...
Words: 1106 - Pages: 5
...Length: 3 Parts: See Assignment Details Points Possible: 75 Graphs and Trees Task Background: Graphs and trees provide you with ways to visualize data sets, and the opportunity to do analysis on the data (e.g., shortest path). Knowing the structure of a database enables you to choose a proper algorithm for searching for data within a database. Primary Task Response: Within the Discussion Board area, write up to 3 paragraphs that respond to the following questions with your thoughts, ideas, and comments. This will be the foundation for future discussions by your classmates. Be substantive and clear, and use examples to reinforce your ideas. Part I (25 points – distributed as follows) Trees are somewhat less complicated than graphs, which makes things like data searching easier, when a data has the structure of a tree. However, not all data can be represented by a tree. Give an example of a data set that cannot be represented by a tree, but that can be represented by a more general graph. 1) Create, show, and describe your data set. (5 points) V = {Bill, John, Kim, James, Chris, Destiny, Noah, Paul} E = {(Bill, John), (Kim, James), (Chris, Destiny), (Noah, Paul), (Bill, Kim), (John, Chris), (Destiny, Noah)} These are people that are employees at a store. Some work on the same shift together and associate with each other. 2) Then, show by building a graph, how your data is represented by a graph. (5 points) Bill Bill John John Chris Chris Kim Kim ...
Words: 1054 - Pages: 5
...数据结构基本英语词汇 I like ITPUB! 数据结构基本英语词汇 数据抽象 data abstraction 数据元素 data element 数据对象 data object 数据项 data item 数据类型 data type 抽象数据类型 abstract data type 逻辑结构 logical structure 物理结构 phyical structure 线性结构 linear structure 非线性结构 nonlinear structure 基本数据类型 atomic data type 固定聚合数据类型 fixed-aggregate data type 可变聚合数据类型 variable-aggregate data type 线性表 linear list 栈 stack 队列 queue 串 string 数组 array 树 tree 图 grabh 查找,线索 searching 更新 updating 排序(分类) sorting 插入 insertion 删除 deletion 前趋 predecessor 后继 successor 直接前趋 immediate predecessor 直接后继 immediate successor 双端列表 deque(double-ended queue) 循环队列 cirular queue 指针 pointer 先进先出表(队列) first-in first-out list 后进先出表(队列) last-in first-out list 栈底 bottom 栈定 top 压入 push 弹出 pop 队头 front 队尾 rear 上溢 overflow 下溢 underflow 数组 array 矩阵 matrix 多维数组 multi-dimentional array 以行为主的顺序分配 row major order 以列为主的顺序分配 column major order 三角矩阵 truangular matrix 对称矩阵 symmetric matrix 稀疏矩阵 sparse matrix 转置矩阵 transposed matrix 链表 linked list 线性链表 linear linked list 单链表 single linked list 多重链表 multilinked list 循环链表 circular linked list 双向链表 doubly linked list 十字链表 orthogonal list 广义表 generalized list 链 link 指针域 pointer field 链域 link field 头结点 head node 头指针 head pointer 尾指针 tail pointer 串 string 空白(空格)串 blank string 空串(零串) null string 子串 substring 树 tree 子树 subtree 森林 forest 根 root 叶子 leaf 结点 node 深度 depth 层次 level 双亲 parents 孩子 children 兄弟 brother 祖先 ancestor 子孙 descentdant ...
Words: 1522 - Pages: 7
...Drakulić express the experience of war in the balkans and what women had to endure during that tough time. In the introduction of her piece Drakulić says, “ War pushes you to the painful point where you are forced to realize and acknowledge the way you participate in it, become its accomplice”(2). This sentence and the way Drakulić drafted or explain how she viewed war explained what she expressed and thought. Nonetheless, Drakulić express the fact that she did not want to accept the fact that they were at war at the time. She did not want to think about other things from the past. Drakulić explained almost everything she saw from the men being dragged on his feet to flying over Manhattan. Drakulić says, “ There is still an impulse to ignore...
Words: 374 - Pages: 2
...Lecture 12: Mean Shift and Normalized Cuts CAP 5415 Fall 2006 Each Pixel Data Vector Example Once we have vectors… • Group the vectors into clusters • Algorithms that we talked about last time: – K-means – EM (Expectation Maximization) • Today: (From Comanciu and Meer) – Mean-Shift – Normalized Cuts Mean-Shift • Like EM, this algorithm is built on probabilistic intuitions. • To understand EM we had to understand mixture models • To understand mean-shift, we need to understand kernel density estimation (Take Pattern Recognition!) Basics of Kernel Density Estimation • Let’s say you have a bunch of points drawn from some distribution • What’s the distribution that generated these points? Using a Parametric Model • Could fit a parametric model (like a Gaussian) • Why: – Can express distribution with a few number of parameters (like mean and variance) Non-Parametric Methods • We’ll focus on kernel-density estimates • Basic Idea: Use the data to define the distribution • Intuition: – If I were to draw more samples from the same probability distribution, then those points would probably be close to the points that I have already drawn – Build distribution by putting a little mass of probability around each data-point • Why not: – Limited in flexibility Example Formally Kernel • Most Common Kernel: Gaussian or Normal Kernel • Another way to think about it: (From Tappen – Thesis) – Make an image, put 1(or more) wherever you have...
Words: 775 - Pages: 4
...vertices distinct ==> different edges + no cycles G and H are isomorphic if there exists an isomorphism and γ = V(G) ---> V(H) such that if {u,v} edge in G then {γ(u), γ (v)} edge in H each vertex goes to another vertex degrees are the same shapes are mapped too to prove two graphs are isomorphic check the degree lists….if they match find a mapping between the two graphs Euler path = simple path which goes through each edge exactly once Euler circuit = closed Euler path Theorem: A graph that has an Euler circuit must have all vertices of even degree Graph: If 2 vertices of odd degree or ==> Euler path 0 vertices of odd degree...
Words: 384 - Pages: 2
...mathematics includes studying areas such as set theory, logic, relations, graph theory, and analysis of algorithms. This course is intended to provide students with an understanding of these areas and their use in the field of Information Technology. Policies Faculty and students/learners will be held responsible for understanding and adhering to all policies contained within the following two documents: University policies: You must be logged into the student website to view this document. Instructor policies: This document is posted in the Course Materials forum. University policies are subject to change. Be sure to read the policies at the beginning of each class. Policies may be slightly different depending on the modality in which you attend class. If you have recently changed modalities, read the policies governing your current class modality. Course Materials Grimaldi, R. P. (2004). Discrete and combinatorial mathematics: An applied introduction. (5th ed.). Boston, MA: Pearson Addison Wesley. Article References Albert, I. Thakar, J., Li, S., Zhang, R., & Albert, R. (2008). Boolean network simulations for life scientists. Source Code for Biology and Medicine, 14(3), 16. Alikhani, S., & Peng, Y-H. (2009). Chromatic zeros and the golden ratio. Applicable Analysis & Discrete Mathematics, 3(1), 120–22. Arvind, V., Cheng, C. T., & Devanur, N. R. (2008). On computing the distinguishing numbers of planar graphs and beyond: A counting approach. SIAM Journal on...
Words: 1711 - Pages: 7
...Phase 3 DB Graphs and Trees Elie De Jesus MATH203-1302A-01 – Discrete Mathematics Professor Andrew Halverson April 24, 2013 Part I Graphs and trees are a little more complicated to understand than what I thought. Based on the information that I found they give you a way to visualize your sets and use the data that you have to find the shortest path. So because of this it shows that Trees cannot contain a cycle, so a set would be Y=COS(X); which can be a general graph but not a tree. The one example that I understood was the one about “the mileage on a bike”. Now I don’t quite understand the example but it shows that the graph would have a decrease in mileage where as it would increase in time. That is not how a tree is explained because there is no sequence to be shown for the data. This is the examples graph: So based on that example I understand that the tree encoding defines a root node or one path between two nodes that represent the output of a solution. A tree is still a graph but without multiple paths. So to be a tree it has to start from any node and be able to reach another, there can be no cycles, and you must have more nodes that edges. Part II To first answer this question one must know the meaning of a Breadth-first or a Depth-first. A Breadth-first search is a strategy for searching in a graph when search is limited to essentially two operations: (a) visit and inspect a node of a graph; (b) gain access to visit the nodes that neighbor the currently...
Words: 479 - Pages: 2
...Q1. The above represents a random looking undirected graph where the circles represent nodes and the boundary circumscribes all the nodes of the graph. The length of the segment joining two nodes represents the length of the shortest path from one node to another. Let’s assume nodes A and B are the farthest pair of nodes according to the definition in the question. Thus A and B have to be on the circumscribing boundary. Thus AB represents the diameter of the graph. Let C be any random node in the graph. Let D be a point which is farthest away from C. So if a BFS is launched on node C, the depth(in terms of the summation of the edges) of the BFS tree rooted at C will be equal to CD. As a result CD >= CA and CD>=CB. Now let AB = d. So from triangle inequality CA+CB>=d. Thus d/2 <= max(CA,CB)<=d. Now since CD is greater than or equals to both CA and CB, it has to be greater than or equals to d/2 as well. CD has to be less than d as well because if not then CD would have been the diameter. But that is not the case. Hence d/2<=CD<=d thus if we can find the length of CD we are done with approximating the value of the diameter within a factor of 2 and that we can do by creating BFS tree from C and calculating depth of the tree which is nothing but...
Words: 269 - Pages: 2
...Inductive Triple Graphs: A purely functional approach to represent RDF Jose Emilio Labra Gayo1 , Johan Jeuring2 , and Jose María Álvarez Rodríguez3 1 University of Oviedo Spain labra@uniovi.es Utrecht University, Open University of the Netherlands The Netherlands j.t.jeuring@uu.nl 3 South East European Research Center Greece jmalvarez@seerc.org 2 Abstract. RDF is one of the cornerstones of the Semantic Web. It can be considered as a knowledge representation common language based on a graph model. In the functional programming community, inductive graphs have been proposed as a purely functional representation of graphs, which makes reasoning and concurrent programming simpler. In this paper, we propose a simplified representation of inductive graphs, called Inductive Triple Graphs, which can be used to represent RDF in a purely functional way. We show how to encode blank nodes using existential variables, and we describe two implementations of our approach in Haskell and Scala. 1 Introduction RDF appears at the basis of the semantic web technologies stack as the common language for knowledge representation and exchange. It is based on a simple graph model where nodes are predominantly resources, identified by URIs, and edges are properties identified by URIs. Although this apparently simple model has some intricacies, such as the use of blank nodes, RDF has been employed in numerous domains and has been part of the successful linked open data movement. The main strengths...
Words: 5524 - Pages: 23
...“Stopping Distance of a Car” Introduction: In this virtual experiment, a yellow sports car is coming to a stop from some initial velocity. On the left of the screen below the car you see a position vs. time and velocity vs. time graph of the motion. On the right of the screen below the car you are given lots of information about the car’s motion: time, distance covered, speed, distance traveled before braking, distance traveled after braking, and total stopping distance. Follow the instructions for the lab and answer questions as you proceed. Instructions: 1. Load up the Java Lab from the website shown above. 2. On the left side of the screen select “Stopping Distance of a Car” 3. Before you start recording data for the lab, “play” around with the buttons at the bottom of the screen and see what they do. (Play, pause, reset, step back, step forward.) 4. When you feel comfortable, hit the “clear trace” button and go on to procedure 1. Procedure-Part 1 Reset/clear trace and have the initial speed is set at 80 km/hr, the reaction time is 0.10 s, and the coefficient of friction is equal to 1.00. Answer the questions below PRIOR to running the simulation: Analysis-Part 1 1. Convert 80 km/hr into m/s. (The graphs are in meters and seconds!) Show math. 1 hr = 3600 sec 1 km = 1000 m 80 km 1000 m 1 hr ------ × ------ × -------- = 22.2222 meters per second hr 1 km 3600 sec 2. Where do you see this...
Words: 1538 - Pages: 7
...The Efficiency of a Ramp By: Tony Akiki Partner: Nikolas Dobson Teacher: Mr. Devine Class: SPH3U1 School: Saint Johns Collage Date Concluded: June 10, 2016 Due Date: June 17, 2016 Question: How does the angle of inclination on a ramp affect the efficiency of the ramp? Hypothesis: I believe that the steeper the ramp is the more work you have to put in to push it up making to less efficient. If the angle of the ramp is very low, then you will have to put less force into it. This makes sense because if the angle of the ramp is close to 90 degrees the closer it is to free fall. This means that there is nothing under the cart to support it and the only thing preventing the cart from falling is the force of you holding it up in the air, which means that it will take the most force. To conclude the closer, the angle of the ramp is to 90 degrees the more force you will have to put into it to push it up which means that you are getting more work done and thus making it more efficient. Experimental Design: A chair and a piece of wood served as the ramp. A cart flipped on its back with weights attached to it and a newton scale served as the object that had to be pulled up the ramp. The data collected in this experiment will show us how efficient the ramp is at different angles. Table #1: Variables Controlled | Dependent | Independent | * Time of day * Person pulling * Length of ramp * The speed the object is getting pulled up by | * How efficient the...
Words: 1352 - Pages: 6
...Design and Analysis of Computer Algorithm Assignment 2 Name: Boyu Zhang UTD-ID: 2021226566 Email:bxz140830@utdallas.edu Contents Problem 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Problem 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Problem 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Problem 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Problem 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Problem 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Problem 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Problem 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 Problem1 This problem can solution by Dial’s algorithm in the lesson six. We can set up W+2 buckets with the labels of 0, 1, …, W, . Then we carry out the following steps: (a). Initial the buckets with node S be in the bucket 0 and all other nodes be in the bucket . (b). then select the node with the minimum temporary distance label. For the first time, it should be the source node S in the bucket 0. (c). Update the buckets information. Then some node should be moved from the bucket to the corresponding distance bucket. (d). Remove the selected node from the bucket. Then repeat step 2 and 3 until there is no non-empty bucket. Therefore...
Words: 726 - Pages: 3
...Task Background: Graphs and trees are useful in visualizing data and the relations within and between data sets. Conversely, it is also important to be able to represent graphs as databases or arrays, so that programs for processing the data can be written. Part I: Adjacency Matrix and Shortest Path Construct a graph based on the adjacency matrix that appears below. Label all nodes with indices consistent with the placement of numbers within the matrix. ⌈0 | 6 | 0 | 5 | 0⌉ | | 6 | 0 | 1 | 0 | 3 | | | 0 | 1 | 0 | 4 | 8 | | | 5 | 0 | 4 | 0 | 0 | | ⌊0 | 3 | 8 | 0 | 0⌋ | | | | | | * Describe the graph and why it is consistent with the matrix. The Graph above is an undirected graph. As the lines are not directed towards a particular node, the lines or edges go both ways. It is consistent with the matrix because the matrix is defining the edges. * How many simple paths are there from vertex 1 to vertex 5? Explain. There are 3 paths. 1-2-5, 1-2-3-5, 1-4-3-5. * Which is the shortest of those paths? That would be the 1-2 path. As the sum equals 9 and is the shortest path. 1-2-3-5=15 and 1-4-3-5=17 Part II: Trees * Construct and describe a tree that indicates the following: * A college president has 2 employees who answer directly to him or her, namely a vice president and provost. * The vice president and provost each have an administrative assistant. * Three deans answer to the provost, and the heads of finance and alumni relations...
Words: 396 - Pages: 2