VE477 Homework 3

$30.00 $24.00

Questions preceded by a * are optional. Although they can be skipped without any deduction, it is important to know and understand the results they contain. Ex. 1 — Hamiltonian path 1. Explain and present Depth-First Search (DFS). 2. Explain and present topological sorting. Write the pseudo-code of a polynomial time algorithm which decides if…

Rate this product

You’ll get a: zip file solution

 

Categorys:

Description

Rate this product

Questions preceded by a * are optional. Although they can be skipped without any deduction, it is important to know and understand the results they contain.

Ex. 1 — Hamiltonian path

  • 1. Explain and present Depth-First Search (DFS).

  • 2. Explain and present topological sorting.

    1. Write the pseudo-code of a polynomial time algorithm which decides if a directed acyclic graph contains a Hamiltonian path.

    1. Prove its complexity.

    1. To what complexity class does the Hamiltonian path problem belong?

Ex. 2 — Critical thinking

  1. Is the function log n! bounded by a polynomial?

  1. Is the function log log n asymptotically larger than log log n?

  1. Given eight balls of similar size but where one is lighter, detect which one it is, while minimizing the number of weighting. Provide the pseudocode.

Ex. 3 — Rubik’s Cube

In about half a page explain the game and at least two algorithms to solve it. Provide references.

Ex. 4 — The N P classe

Prove that the following problems are in N P.

    1. Does a given graph have a simple path? * 2. Is a given integer composite?

    1. Does a given graph have a vertex cover of size k, for some integer k?

Ex. 5 — PRIMES is in P

The PRIMES problem consists in deciding if a given integer n is prime. A simple algorithm to solve PRIMES is trial division which runs in time O(n). Is it sufficient to prove that PRIMES is in P? Explain.

Hint: use the Prime Number Theorem.

VE477 Homework 3
$30.00 $24.00