Algorithims Final

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

How many constraints does flow have?

2

Consider two strings A = "qpqrr" and B = "pqprqrp". Let x be the length of the longest common subsequence (not necessarily contiguous) between A and B and let y be the number of such longest common subsequences between A and B. Then x + 10y = ___.

34

The following paradigm can be used to find the solution of the problem in minimum time: Given a set of non-negative integer, and a value K, determine if there is a subset of the given set with the sum equal to K:

Dynamic Programming

Given a flow network, let f be any flow and let (A,B) be any cut. Then, the net flow across (A,B) is __________ the value of f.

Equal to

True or False: Merge sort is preferred for arrays over linked lists.

False

The problem of finding a path in a graph that visits every vertex exactly once is called?

Hamiltonian path problem

We use the dynamic programming approach when?

It's faster than Greedy.

Which of the following stable sorting algorithm takes the least time when applied to an almost sorted array?

Merge Sort

Which of the following method is used for sorting in merge sort?

Merging

___________ is a partition of the vertices of a graph in two disjoint subsets that are joined by at least one edge.

Minimum Cut

Suppose that you run the Ford-Fulkerson algorithm (using the shortest augmenting path heuristic) to solve a bipartite matching problem with N students and N companies. How many augmenting paths are needed in the worst case?

N

_________ is the class of decision problems that can be solved by non-deterministic polynomial algorithms?

NP

What is the average case time complexity of merge sort?

O(n log n)

Which of the following standard algorithms is not Dynamic Programming based?

Prim's Minimum Spanning Tree

Which of the following is not a stable sorting algorithm?

Quick Sort

Does the Ford- Fulkerson algorithm use the idea of?

Residual Graphs

An algorithm to find the length of the longest monotonically increasing sequence of numbers in an array A[0:n-1] is given below. Let Li denote the length of the longest monotonically increasing sequence starting at index i in the array. Which of the following is True?

The algorithm uses dynamic programming.

Problems that can be solved in polynomial time are known as?

Tractable

True or False: The sum and composition of two polynomials are always polynomials.

True

Problems that cannot be solved by any algorithm are called?

Undecidable problems


Set pelajaran terkait

Chapter 16: Disorders of the Immune Response Porth

View Set

English society during Henry VII and Henry VIII's reign.

View Set

World Geography Semester Exam Study Guide 2

View Set

Module 6 - HESI Safety & Infection Control

View Set

Communications 103 Final Study Guide (Richardson)

View Set