...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
... 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 forget the arrow! Draw a box to the right of activity C for any activities which list C as a predecessor. (E in our example). Connect this box to activity C, don't forget the arrow! Draw a box to the right of activity D for any activities which list D as a predecessor. (F in our example). Connect this box to activity D, don't forget the arrow! ...
Words: 1106 - Pages: 5
...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
...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
...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
...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
...数据结构基本英语词汇 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
...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
...PART III GRAPH THEORY 224 13 Food Webs Author: College. Robert A. McGuigan, Department of Mathematics, Westfield State Prerequisites: The prerequisites for this chapter are basic concepts of graph theory. See Sections 9.1 and 9.2 of Discrete Mathematics and Its Applications. Introduction A food web is a directed graph modeling the predator-prey relationship in an ecological community. We will use this directed graph to study the question of the minimum number of parameters needed to describe ecological competition. For this purpose we will consider how graphs can be represented as intersection graphs of families of sets. We will also investigate the axiomatic description of measures of status in food webs. Competition In an ecological system, the various species of plants and animals occupy niches defined by the availability of resources. The resources might be defined in terms of factors such as temperature, moisture, degree of acidity, amounts of nutrients, 225 226 Applications of Discrete Mathematics and so on. These factors are subject to constraints such as temperature lying in a certain range, pH lying within certain limits, etc. The combination of all these constraints for a species then defines a region in n-dimensional Euclidean space, where n is the number of factors. We can call this region the ecological niche of the species in question. For example, suppose we restrict ourselves to three factors, such as temperature...
Words: 4994 - Pages: 20
...a. the angle between a line on a graph and the positive limb of the x-axis b. the smaller dihedral angle between one plane and another 7. (Astronomy) astronomy the angle between the plane of the orbit of a planet or comet and another plane, usually that of the ecliptic 8. (General Physics) physics another name for dip28 ˌincliˈnational adj Collins English Dictionary – Complete and Unabridged © HarperCollins Publishers 1991, 1994, 1998, 2000, 2003 in•cli•na•tion (ˌɪn kləˈneɪ ʃən) n. 1. a special disposition of the mind or temperament; a liking or preference: a great inclination for sports. 2. something to which one is inclined. 3. the act of inclining or state of being inclined. 4. a tendency toward a certain condition, action, etc. 5. deviation or amount of deviation from a normal, esp. horizontal or vertical, direction or position. 6. an inclined surface. 7. a. the angle between two lines or two planes. b. the angle formed by the x-axis and a given line. [1350–1400; Middle English < Latin]1. (often foll by: for, to, towards, or an infinitive) a particular disposition, esp a liking or preference; tendency: I've no inclination for such dull work. 2. the degree of deviation from a particular plane, esp a horizontal or vertical plane 3. a sloping or slanting surface; incline 4. the act of inclining or the state of being inclined 5. the act of bowing or nodding the head 6. (Mathematics) maths a. the angle between a line on a graph and the...
Words: 4637 - Pages: 19
...MAT 116 Week 1 Quiz (New) FOR MORE CLASSES VISIT www.mat116tutor.com 1) Calculate the sum of 1/4 and 1/7 2) Calculate the product of 1/3 and ¼ 3) Select the expression that represents the statement “5 more than a number” 4) Determine the value of 3(x+4)-7 when x=9 5) Determine the value of x(7-x)+5 when x=-2 6) Select the expression that represents the statement “7 times a number” 7) There are 12 inches in a foot. How many inches are in 3 feet 8) In a given training week, a swimmer completes 3/7 mile on day one, 2/3 mile on day two and ½ mile on day three. How many miles does the athlete swim in the given week? 9) Select the simplified expression for 9(x-5)-5(x-2)+2x. 10) The temperature on one day in January for Phoenix, AZ, is 63 degrees Fahrenheit. On the same day in Barrow, AK, the temperature is -16 degrees Fahrenheit. What is the difference between these two temperatures? 11) If the pattern shown in the table were continued, what number would appear in the box at the bottom of column B next to 14? A B 2 5 4 9 6 13 8 17 14 ? 12) The object on the scale below makes it balance exactly. According to this scale, if Balances t then balance which of the following? 13) If a>0 and b-3 6) Solve the inequality 0.3(0.3x+0.8) ≤ - 0.3 7) In the equation y=4x, if the value of x is increased by 2, what is the effect on the value...
Words: 677 - Pages: 3
...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 we can compute the shortest paths from source vertexs in O(W|V|+|E|). Because the extract part’s step during the Dijkstra's algorithm takes O(W|V|) time while the decreasing operation still takes O(E) time. Problem 2 Bottleneck Path Problem algorithm for directed graphs 2 1: INPUT: A directed graph G = (V, E) with m = |E| and edge weights de ∈D for all edge e∈E, source and...
Words: 726 - Pages: 3
...1. If you knew that the vertical intercept for a straight line was 15, that the slope was -.5, and that the independent variable had a value of 8, the value of the dependent variable would be: 11 2. In a demand graph showing the relationship between price and how much of a good the buyers will buy, the convention that economists follow is to place price on the: Vertical axis even though it is the independent variable 3. On a graph of two variables, X and Y, ceteris paribus means that: Other variables not shown are held constant 4. There are two sets of (x,y) points on a straight line in a two-variable graph with y on the vertical axis and x on the horizontal axis. If one set of points was (0,6) and the other set (6,18), the linear equation for the line would be: y=6+2x 5. The slope of a straight line is the ratio of the: vertical to horizontal 6. If a linear relation is described by the equation was C = 35 - 5D, then the slope of the line would be: 7. If two variables are directly related they will always graph as: an upsloping line 8. When variables A and B are negatively correlated, it implies that: A and B may or may not be causally related 9. A relationship illustrated by an upsloping graph means that an: Decrease in the value of one variable causes the value of the other to decrease 10. There are two sets of (x,y) points on a straight line in a two-variable graph with y on the vertical axis and x on the horizontal axis. If one set of points...
Words: 400 - Pages: 2
...Unit 6: Graph Theory - Assignment Total points for Assignment: 35 points. Assignments must be submitted as a Microsoft Word document and uploaded to the Dropbox for Unit 6. All Assignments are due by Tuesday at 11:59 PM ET of the assigned Unit. NOTE: Assignment problems should not be posted to the Discussion threads. Questions on the Assignment problems should be addressed to the instructor by sending an email or by attending office hours. You must show your work on all problems. If a problem is worth 2 points and you only show the answer, then you will receive only 1 point credit. If you use a calculator or online website, give the source and tell me exactly what you provided as input. For example, if you used Excel to compute 16 * 16, state “I typed =16*16 into Excel and got 256. You may type your answer right into this document. Part I. Basic Computations 1. (4 points) The plan for a four-room house is shown below. Draw a graph that models the connecting relationships between the areas in the floor plan. [Your graph does not [Your graph does not need to be fancy. You may use any drawing software such as Visio or Creatly.com] Answer: I used viso for graph[pic] 2. a. Identify all the vertices in the above graph with odd degree. Identify the degree of each of these vertices. (2 points) Answer: The odd number of edges is a odd degree vertices are D,E,F from the graph 3,1,3 it has a odd number. So D,E,F, is odd and the rest is...
Words: 1293 - Pages: 6