• Verkeerd document? Gratis ruilen
  • Geschreven door studenten die geslaagd zijn
  • Direct beschikbaar na je betaling
  • Online lezen of als PDF
Verkopen
Kies je studieland
Kies je taal
Document preview thumbnail
Voorbeeld 2 van de 10 pagina's
Tentamen (uitwerkingen)

CS6515 Exam 3 with verified solutions

Document preview thumbnail
Voorbeeld 2 van de 10 pagina's

CS6515 Exam 3 with verified solutions

Voorbeeld van de inhoud

CS6515 Exam 3 with verified solutions

The |!||!| Class |!||!| P |!||!| - |!||!| correct |!||!| answer |!||!| ✔A |!||!| solution |!||!| may |!||!| be |!||!| found |!||!| in |!||!| polynomial |!||!| time



The |!||!| Class |!||!| NP |!||!| - |!||!|correct answer
|!||!| |!||!| ✔A |!||!| solution |!||!| may |!||!| be |!||!| verified |!||!| in |!||!| polynomial |!||!| time



NP-Hard |!||!| - correct
|!||!| |!||!| answer |!||!| ✔We |!||!| are |!||!| yet |!||!| to |!||!| find |!||!| a |!||!| polynomial |!||!| time |!||!| solution



NP-Complete |!||!| - |!||!| correct answer
|!||!| |!||!| ✔Both |!||!| in |!||!| NP |!||!| and |!||!| at |!||!| least |!||!| as |!||!| hard |!||!| as |!||!| NP-Hard |!||!|


problems



NP Reduction - Steps - correct
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| answer |!||!| ✔1. |!||!| Demonstrate |!||!| that |!||!| problem |!||!| B |!||!| is |!||!| in
the class of NP Problems
|!||!| |!||!| |!||!| |!||!| |!||!|




- |!||!| validate |!||!| a |!||!| solution |!||!| in |!||!| polynomial |!||!| time



2. Demonstrate that problem B is at least as hard as a problem believed to
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|


be NP-Complete. This is done via a reduction from a known problem A (A-
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|


>B)



a) |!||!| Show |!||!| how |!||!| an |!||!| instance |!||!| of |!||!| A |!||!| is |!||!| converted |!||!| to |!||!| B |!||!| in |!||!| polynomial |!||!| time



b) Show how a solution
|!||!| |!||!| |!||!| |!||!| |!||!| to |!||!| B |!||!| can |!||!| be |!||!| converted |!||!| to |!||!| a |!||!| solution |!||!| for |!||!| A, |!||!| again |!||!|


in polynomial time
|!||!| |!||!|




c) |!||!| Show |!||!| that |!||!| a |!||!| solution |!||!| for |!||!| B |!||!| exists |!||!| IF |!||!| AND |!||!| ONLY |!||!| IF |!||!| a |!||!| solution |!||!| to |!||!| A |!||!| exists

- most prove both
|!||!| |!||!| |!||!| parts:
|!||!| |!||!| if |!||!| you |!||!| you |!||!| have |!||!| a |!||!| solution |!||!| to |!||!| B, |!||!| you |!||!| have |!||!| a |!||!|


solution to A |!||!| |!||!|




- |!||!| If there
|!||!| |!||!| is |!||!| no |!||!| solution |!||!| to |!||!| B, |!||!| then |!||!| no |!||!| solution |!||!| exists |!||!| to |!||!| A

, LP: Why |!||!| |!||!| optimum |!||!| occurs |!||!| at |!||!| a |!||!| vertex |!||!| - |!||!| correct |!||!| answer |!||!| ✔Feasible |!||!| region |!||!| is |!||!|


convex



LP: Optimum achieved at
|!||!| |!||!| |!||!| |!||!| a |!||!| vertex |!||!| except: |!||!| - |!||!| correct |!||!| answer |!||!| ✔1. |!||!| Infeasible |!||!| - |!||!|


feasible region is empty |!||!| |!||!| |!||!|




2. |!||!| Unbounded |!||!| - |!||!| optimal |!||!| value |!||!| of |!||!| objective |!||!| function |!||!| is |!||!| arbitrarily |!||!| large



Independent Set -> Vertex Cover - correct answer ✔Lemma:
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| I
|!||!| |!||!| is |!||!| an |!||!| independent
set of G(V, E) iff V - I is a vertex cover of G
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|




Simply check if there |!||!| |!||!| |!||!| |!||!| is |!||!| a |!||!| vertex |!||!| cover |!||!| of |!||!| size |!||!| V |!||!| - |!||!| b |!||!| in |!||!| G(V, |!||!| E). |!||!| If |!||!| there |!||!|


is, output V - S
|!||!| |!||!| |!||!| |!||!|




3SAT -> Independent Set - correct answer ✔Lemma: f is satisfiable iff the
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|


resulting set has an independent set of size m (# of clauses in f) in G(V,
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|


E).



To construct G(V, E), create a node for each literal in each clause and
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|


connect them by an edge. Also connect any literal with it's negation.
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|




Independent Set -> Clique - correct answer ✔Lemma: G(V, E) has
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| an |!||!|


independent set of size g iff G'(V, E) has a clique of size g.
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|




To construct G'(V, E), add all the vertices in G(V, E)
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| to |!||!| G'(V, |!||!| E) |!||!| and |!||!| add |!||!|


edges to G'(V, E) if there is no edge in G(V, E)
|!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!| |!||!|




SAT - correct|!||!| |!||!| |!||!| answer |!||!| ✔Input: |!||!|C |!||!| is |!||!| a |!||!| CNF |!||!| with |!||!| any |!||!| # |!||!| of |!||!| variables |!||!| (n) |!||!| and |!||!|


clauses (m) |!||!|




Output: |!||!| assignment |!||!| of |!||!| each |!||!| variable |!||!| s.t. |!||!| the |!||!| CNF |!||!| is |!||!| True



3SAT - |!||!| |!||!| correct |!||!|answer |!||!|✔Input: |!||!| C |!||!| is |!||!| a |!||!| CNF |!||!| whose |!||!| clauses |!||!| have |!||!| at |!||!| most |!||!| 3 |!||!|


literals

Documentinformatie

Geüpload op
11 februari 2025
Aantal pagina's
10
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden
$12.99

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Ruiz
3.2
(15)
Verkocht
107
Volgers
4
Items
14206
Laatst verkocht
1 dag geleden




Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen