{"id":95375,"date":"2018-09-21T07:40:38","date_gmt":"2018-09-21T07:40:38","guid":{"rendered":"https:\/\/essays.homeworkacetutors.com\/matrices\/"},"modified":"2018-09-21T07:40:38","modified_gmt":"2018-09-21T07:40:38","slug":"matrices","status":"publish","type":"post","link":"https:\/\/www.colapapers.com\/us\/matrices\/","title":{"rendered":"matrices"},"content":{"rendered":"<p>Given the BST to the right, provide the following (Each is independent of the others) (8pts)<\/p>\n<ol>\n<li>Show the result of inserting 17<\/li>\n<li>Show the result of removing 27<\/li>\n<li>Show the result of removing 50<\/li>\n<li>Show the result of removing 20<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"2\">\n<li>For the graph to the right, provide the following(each is independent of the others) (15pts)\n<ol>\n<li>Show the node order and spanning tree that results from BFS(5)<\/li>\n<li>Show the node order that results from BFS(4)<\/li>\n<li>Show the node order that results from the DFS(5)<\/li>\n<li>Show the node order that results from the DFS(4)<\/li>\n<li>Construct an adjacency matrix representation for this graph<\/li>\n<li>Construct an adjacency list representation for this graph<\/li>\n<li>Find the shortest path from 1 to all other nodes<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"3\">\n<li>Below is the adjacency matrix for a directed weighted graph. Draw the visual representation of the graph it represents (6pts)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"68\"><strong>\u00a0<\/strong><\/td>\n<td width=\"68\"><strong>1<\/strong><\/td>\n<td width=\"68\"><strong>2<\/strong><\/td>\n<td width=\"68\"><strong>3<\/strong><\/td>\n<td width=\"68\"><strong>4<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"68\"><strong>1<\/strong><\/td>\n<td width=\"68\">&nbsp;<\/td>\n<td width=\"68\">3<\/td>\n<td width=\"68\">4<\/td>\n<td width=\"68\">&nbsp;<\/td>\n<\/tr>\n<tr>\n<td width=\"68\"><strong>2<\/strong><\/td>\n<td width=\"68\">1<\/td>\n<td width=\"68\">&nbsp;<\/td>\n<td width=\"68\">6<\/td>\n<td width=\"68\">8<\/td>\n<\/tr>\n<tr>\n<td width=\"68\"><strong>3<\/strong><\/td>\n<td width=\"68\">7<\/td>\n<td width=\"68\">&nbsp;<\/td>\n<td width=\"68\">&nbsp;<\/td>\n<td width=\"68\">9<\/td>\n<\/tr>\n<tr>\n<td width=\"68\"><strong>4<\/strong><\/td>\n<td width=\"68\">&nbsp;<\/td>\n<td width=\"68\">&nbsp;<\/td>\n<td width=\"68\">&nbsp;<\/td>\n<td width=\"68\">&nbsp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"4\">\n<li>What big O family would you classify the following code fragment as? Why? (6pts)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>while(val&gt; 0)<\/p>\n<p>{<\/p>\n<p>sum += val;<\/p>\n<p>val \/= 2;<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"5\">\n<li>The below code fragments can be used to implement a list with LIFO behavior(6pts)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>N++\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |\u00a0\u00a0\u00a0 val = L[n];<\/p>\n<p>L[n] = val |\u00a0\u00a0\u00a0 n&#8211;;<\/p>\n<p>&nbsp;<\/p>\n<p>This code is simple however your boss believes you need to go through all the extra pieces of work and fully implement a stack and follow stack naming conventions.\u00a0 Why would that be preferable to the easy to use and implement code above?<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"6\">\n<li>Now for a little bit of a thinker. It is possible that we can see a O(n^2) algorithm perform a task faster then a O(n) algorithm.\u00a0 Explain how that may be possible and do these sorts of cases show O() is not useful. (6pts)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol start=\"7\">\n<li>Show the state of each listed data structure after the insertion of the following data<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>5, 2, 7, 13, 4<\/p>\n<p>&nbsp;<\/p>\n<p>Then show me the state of the structure after 1 REMOVE operation. Diagrams are preferable, ensure whatever you choose is very clearly marked. (14pts)<\/p>\n<p>&nbsp;<\/p>\n<p>Stack<\/p>\n<p>Max heap<\/p>\n<p>Binary search tree<\/p>\n<p>Hashtable(5 buckets, mod number by 5 for hash algorithm, use chaining for collisions)<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"8\">\n<li>Linked list operations. Write a code fragment for each(code fragment, not entire program!)(8pts)<\/li>\n<\/ol>\n<ul>\n<li>p, q, and r are pointers into the list<\/li>\n<li>Each node in the list has a val and next field<\/li>\n<li>Assume p, q, and r are initialized properly\n<ol>\n<li>Print the larger of the 2 values of p and q<\/li>\n<li>Insert r between p &amp; q in the list, where p &amp; q are consecutive items<\/li>\n<li>Assume p and q point to items in a linked list and that p is to the left of q (p is before q). Write a loop that forces r to visit each node between p and q<\/li>\n<li>p points to a node in the middle of the list(not beginning or end). Delete the node after p.<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ol start=\"9\">\n<li>In class, we discussed both Prim\u2019s &amp;Kruskal\u2019s algorithms and how they may result in the same or different MST. Provide a graph where they will provide a different MST.(6pts)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol start=\"10\">\n<li>Consider the QuickSort algorithm. Show a reasonable state of the list after the first round of choosing a pivot point and partitioning the list(6pts)<\/li>\n<\/ol>\n<p>List: 17, 45, 11, 30, 47, 12, 33<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"11\">\n<li>When studying O() we always end up with terms like O(N), O(N^2), O(N^3) even though there are other statements in the code that make up the overall efficiency of the program. For instance take the code below<\/li>\n<\/ol>\n<p>for(i = 0; i&lt; x; i++)<\/p>\n<p>{<\/p>\n<p>for(z = 0; z &lt; x; z++)<\/p>\n<p>{<\/p>\n<p>Val *= 2;<\/p>\n<p>Tmp += 1;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>while(x != 0)<\/p>\n<p>{<\/p>\n<p>Val \u2013= x;<\/p>\n<p>x&#8211;;<\/p>\n<p>}<\/p>\n<p>Return 0;<\/p>\n<p>&nbsp;<\/p>\n<p>Would become O(2n^2 + 2n + 1).\u00a0 Why does it make sense to drop all of the other numbers and just take the highest-powered term? In this case O(n^2). (6pts)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"12\">\n<li>Given the graph below, find the solutions to the requested operations and show the process you took to reach those solutions in as much detail as possible(13pts)<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<ol start=\"6\">\n<li>Show the steps in solving the shortest path problem according to Dijkstra\u2019s algorithm when starting at node 6.<\/li>\n<li>Construct the MST for the graph according to Prim\u2019s algorithm starting at vertex 1<\/li>\n<li>Construct the MST according toKruskal\u2019s algorithm<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td width=\"0\"><\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Given the BST to the right, provide the following (Each is independent of the others) (8pts) Show the result of inserting 17 Show the result of removing 27 Show the result of removing 50 Show the result of removing 20 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; For the graph [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9827,13849,13851,13852,13848,13850,13847,13853],"tags":[13855,13859,13856,13858,13854,13860,13857,13861],"class_list":["post-95375","post","type-post","status-publish","format-standard","hentry","category-affordable-college-homework-help-online","category-best-assignment-help-for-masters-students-au","category-complete-my-essay-in-300-400-words-today","category-expert-research-paper-topics-and-writing-help","category-hire-someone-to-write-essay-fast-online","category-need-help-writing-a-masters-thesis-paper-us","category-professional-dissertation-writing-service-uk","category-same-day-essay-writing-service-in-hours","tag-best-assignment-help-australia-2026","tag-cheap-homework-help-online-usa","tag-dissertation-writing-help-for-masters-students-uk","tag-i-need-my-essay-completed-in-300-400-words-fast","tag-pay-someone-to-write-my-essay-in-12-hours","tag-research-paper-writing-service-with-free-plagiarism-report","tag-write-a-1500-word-essay-in-apa-format","tag-write-my-thesis-paper-for-masters-degree-australia"],"_links":{"self":[{"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/posts\/95375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/comments?post=95375"}],"version-history":[{"count":0,"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/posts\/95375\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/media?parent=95375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/categories?post=95375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.colapapers.com\/us\/wp-json\/wp\/v2\/tags?post=95375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}