100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CS 6515 FINAL EXAM ACTUAL COMPLETE 90 QUESTIONS AND CORRECT DETAILED ANSWERS (VERIFIED ANSWERS) WITH RATIONALES |ALREADY GRADED A+||BRAND NEW VERSION!!. £14.70   Add to cart

Exam (elaborations)

CS 6515 FINAL EXAM ACTUAL COMPLETE 90 QUESTIONS AND CORRECT DETAILED ANSWERS (VERIFIED ANSWERS) WITH RATIONALES |ALREADY GRADED A+||BRAND NEW VERSION!!.

 23 views  0 purchase
  • Module
  • CS 6515
  • Institution
  • CS 6515

CS 6515 FINAL EXAM ACTUAL COMPLETE 90 QUESTIONS AND CORRECT DETAILED ANSWERS (VERIFIED ANSWERS) WITH RATIONALES |ALREADY GRADED A+||BRAND NEW VERSION!!.

Preview 4 out of 37  pages

  • September 27, 2024
  • 37
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CS 6515
  • CS 6515
avatar-seller
CS 6515 FINAL EXAM ACTUAL EXAM COMPLETE 90
QUESTIONS AND CORRECT DETAILED ANSWERS (VERIFIED
ANSWERS) WITH RATIONALES |ALREADY GRADED A+||BRAND
NEW VERSION!!.


Kite Reduction ✔✔CORRECT ANSWER✔✔Prove Kite is in np by verifying that
- check for the clique - O(n^2)
- check for the tail of degree <= 2 nodes O(n)
- check for that the tail is connected to the clique with Explore (O(n)


Reduce Clique to kite by adding a tail of length g to each vertex in graph G
O(n^2)


Transform back to Clique by removing all vertexs of degree <= 2 (prune the
tails)


If there is no solution to kite then there is no clique in G
If there is a solution to kite, removing the tail is then a solution to clique
CMM ✔✔CORRECT ANSWER✔✔Chain Matrix Multiply


If your problem needs a windowing check
If your problem is looking to split an array
Ilooking to split an array in some way to do something

,Start a window size of 1-> n
set i to 1->n-window
Set j to i+window
Calculate T(i,j) using smaller windows between i and j


Let m[i-1] and m[i] be the dimensions of A[i]
Let T(i,j) = minimum cost for computing A[i] * A[i+1] * .. A[j]
T(i,i) = 0 for 1<=i<=n
For 1<=i<j<=n
T(i,j) = Min {T(i,k) + T(k+1,j) + m[i-1] *m[k]*m[j] L i<=k<=j-1}


Quick Sort Runtime ✔✔CORRECT ANSWER✔✔O(n^2)
O(nlogn) with median of medians


Merge Sort Runtime ✔✔CORRECT ANSWER✔✔O(nlogn)


Quick Select Runtime ✔✔CORRECT ANSWER✔✔O(n^2)
O(n) with median of medians (Fast select)


Dijkstra's algorithm ✔✔CORRECT ANSWER✔✔An algorithm for finding the
shortest paths between nodes in a weighted graph. For a given source node
in the graph, the algorithm finds the shortest path between that node and
every other. It can also be used for finding the shortest paths from a single
node to a single destination node by stopping the algorithm once the

,shortest path to the destination node has been determined. Its time
complexity is O(E + VlogV), where E is the number of edges and V is the
number of vertices.


- uses min-heap (prio-queue)
- O((n+m) log n)
- O(m log n) - strongly connected


- prev(u)


Kruskal's Algorithm ✔✔CORRECT ANSWER✔✔(Minimum Spanning Trees,
O(mlogn) with a union find, which is fast for sparse graphs) Builds up
connected components of vertices, repeatedly considering the lightest
remaining edge and tests whether its two endpoints lie within the same
connected component. If not, insert the edge and merge the two
components into one.


input: undirected G=(V,E) with weights w(e)
1. sort E by incr weight (O(mlogn))
2. set X = empty set
3. for e = (v, w) exists E (go through in order)
if x Ue doesnt have a cycle
then: X = X U e(checks if v and w are in different components: O(log n))
4. return X

, returns MST defined by edges X


Prim's Algorithm for MST ✔✔CORRECT ANSWER✔✔Start with a node and
add edge with the lowest weight. Then from the current existing nodes add
the next smallest edge that exists going out from all the existing nodes. Do
this until all vertices are connected.


- min spanning tree defined by array prev[]
- O(m log n)


Ford-Fulkerson Algorithm ✔✔CORRECT ANSWER✔✔Runtime: O(mC)Input:
Graph with integer edge weights. (Note: Does not work with Infinity)Output:
max flow f*


1. set f_e = 0 for all edges
2. Build residual network G^f for current flow f
3. Check for st-path (cal P) in G^f for current flow f (DFS, BFS)- if no path
exists - output f
4. Given cal P, let c(cal P) = min capacity along cal P in G^f
5. Augment f by c(cal P) units along cal P
6. Repeat 2 until no st-path


Assumes all capacities are integers - C, C = size of max flow

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller teachme2expert. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £14.70. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

66579 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£14.70
  • (0)
  Add to cart