Algorithms留学生作业代写、Java编程作业代做、代写Data Structures作业、代做Java程序设计作业代写Python程序|代写Datab

Data Structures and AlgorithmsHome Quiz 1Problem 1 (4 points)We have a connected graph G = (V, E), and a specific vertex u ∈ V. Suppose we compute a depth-firstsearch tree rooted at u, and obtain a tree T that includes all nodes of G. Suppose we then compute abreadth-first search tree rooted at u, and obtain the same tree T. Prove that G = T. (In other words, if Tis both a depth-first search tree and a breadth-first search tree rooted at u, then G cannot contain anyedges that do not belong to T.)Problem 2 (3 + 3 points)Given is a undirected graph and two of its vertices s and t. Give an O(n+m) algorithm that computesthe number of shortest paths from s to t.Note: You get 3 points if you describe the solution correctly (i.e. pseudocode) and 3 points if youimplement it in Java.Problem 3 (0.5% extra points for implementation)Given is an a × b matrix where every cell corresponds to either an empty space, denoted with a dot (.)or a wall, denoted with X. This matrix represents a maze and in it there are also two creatures: creatureOne (1) and creature Two (2). Creatures start at different empty spaces. And, somehow, they gotsynchronized: They do exactly the same movements when (1) goes west, so does (2); when (1) goeseast, so does (2); and the same happens when they go south or north. They move at the same time: forexample, if (1) is east of (2) and they move east, both creatures move. They cannot go to a locationwhere there is an obstacle (or the other creature, unless it is moving away). For example, if there is anobstacle east of (1) but not of (2), if they go east only (2) moves. Or, if east of (1) there is an obstacleand west of it there is (2), if they try to move east, they will stay in their current locations as (1) isblocked by the obstacle and (2) is blocked by (1).Creatures want to get out of this mysterious maze, and they want to do so at the very same time (that is,they want to leave the house with the same move). Creatures get out of the maze if they move north inrow 1, south in row a, west in column 1, or east in column b. This is proving to be very tricky. Pleasehelp them by designing an O((ab)2) algorithm that computes the smallest number of moves for them toget out (or it will tell them that the task is impossible).Problem 4 (0.5% extra points for implementation)In the small land of Akrokeraunaia, there are a number of magic cities. One of them is the capital.Cities are connected to each other through roads. Every year a single person from each city can visit thecapital. Visitors are selected based on a competition. The rules are as follows:1. The candidates will start running from their cities. (at the same times)2. The entry into the capital will be permitted only for a fixed amount of time (T) from whenthey all start running.3. Whoever can enter the capital during that fixed time will surely be permitted to visit thecapital city.Given the connections and the distances between the cities and the capital, the aim is to write aprogram that finds out how many candidates can visit the capital. In designing the program you canassume the candidates will find a route so that they can get to the capital before the entry closes, ifthere is one.Note that all the cities are numbered from 0 to V-1.Input:First line will contain the number of cities (V), number of roads (E) and time for which gate will beopen for the capital (T).E lines will follow, each containing 3 integers in the format:c1c2twhere, c1 and c2 are the two cities having a road between them and it takes time t to go from onecity to another. Note that all the roads are bidirectional and the city numbered 0 is the capital city.Output:A single integer representing number of candidates that can visit the capitalConstraints:1 1 1 本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp

你可能感兴趣的:(Algorithms留学生作业代写、Java编程作业代做、代写Data Structures作业、代做Java程序设计作业代写Python程序|代写Datab)