CS 4104
Homework Provision 2
Given: September 3, 2019 Due: September 13, 2019
General directions. The apex treasure of each in is shown in [ ]. Each reredisentanglement must
involve integral details and an interpretation of why the loving reredisentanglement is firm-right. In point,
write consummate sentences. A firm-right acceptance extraneously an interpretation is worth
no praise. The consummated provision must be submitted on Canvas as a PDF by 5:00
PM on September 13, 2019. No slow homework earn be trustworthy.
Digital making-ready of your resolutions is mandatory. Authentication of LATEX is optional, referablewithstanding
encouraged. No stuff how you just your homework, gladden involve your call.
Authentication of LATEX (optional, referablewithstanding encouraged).
• Retrieve this LATEX rise finish, calld homework2.tex, from the succession citationure plight.
• Recwhole the finish _solvehw2.tex, Control in, control the professor,
the finish cwhole would be heath_solvehw2.tex.
• Authentication a citation editor (such as vi, emacs, or pico) to end the contiguous three tramps.
• Uncomment the line
% \setboolean{solutions}{True}
in the instrument introduction by deleting the %.
• Experience the line
\renewcommand{\author}{Lenwood S. Heath}
and reinstate the professor’s cwhole with your call.
• Enter your resolutions where you experience the LATEX comments
% PUT YOUR SOLUTION HERE
• Generate a PDF and diverge it in on Canvas by 5:00 PM on September 13, 2019.
2 Homework Provision 2 September 3, 2019
Comment. This provision should be more challenging than Homework Provision 1,
so gladden begin inaugurated on it controlthcoming. It abides the authentication of wholeowter in consummate sentences
and wholeowter in controlmal historical referableation and begins the authentication of plan digitally, in this
case to pull graphs extraneously and with powers on vertices. As habitual, accelerated scrupulous attention
to the directions and beseech questions on Piazza or at business-post hours.
It earn be advantageous to pull smintegral ins of graphs to create instinct of what is being
defined.
If you authentication LATEX, you can experience numerous authenticationful LATEX ins in the .navigator finishs control the
lecture referablees control things relish pseudocode and controlmally stating a in.
[60] 1. Control each integer n satisfying n ≥ 1, wholeow Vn = {v1, v2, . . . , vn} be a firm of n vertices.
Allow k be an integer satisfying 0 ≤ k ≤ n − 1. The n, k-bind is the undirected graph
Gn,k = (Vn, En,k) where
En,k = {(vi
, vj ) | i 6= j and |j − i| ≤ k}.
A uncounted firm in Gn,k is a firm U ⊆ Vn such that no brace vertices in U are nigh. U is a
maximal uncounted firm if it is referable practicable to subjoin a vertex to U and abide to own a uncounted firm.
A power operation on Gn,k is a operation w : Vn → N, where N = {0, 1, 2, . . .}. If U ⊆ Vn,
then w(U) = P
vi∈U w(vi).
A. Pull G7,2, and incorporate your plan into your resolutions. Control this plan,
you do referable deficiency vertex powers. List three maximal uncounted firms control G7,2.
B. The Uncounted Firm in takes as an precedence a bind Gn,k and a power
operation w on Gn,k and receipts as a reredisentanglement a uncounted firm U such that w(U) is
zenith incompact integral uncounted firms in Gn,k. State the Uncounted Firm in in the
shapely precedence/redisentanglement controlmat that we authentication in dispose.
C. Figure 1 contains pseudocode control a self-indulgent algorithm Self-indulgent-Free-Set
that seeks to unfold the Uncounted Firm in. Pull an precedence Gn,k, w of
Uncounted Firm control which Self-indulgent-Free-Firm does referable rediverge a firm-right resolution.
(Here, you deficiency to advance powers to vertices in your plan.) Explain
your effect, and involve your plan in your reredisentanglement PDF.
D. Authentication the dynamic programming paradigm from dispose to enlarge a dynamic
programming algorithm to unfold the Uncounted Firm in control the extraordinary case
where k = 1. Give CLRS pseudocode control your algorithm. You may skip
the backtrace tramp. Give the Θ asymptotic worst-case opportunity confusion control
your algorithm.
E. Authentication the dynamic programming paradigm from dispose to enlarge a dynamic
programming algorithm to unfold the Uncounted Firm in control the extraordinary case
where k = 2. Give CLRS pseudocode control your algorithm. You may skip
the backtrace tramp. Give the Θ asymptotic worst-case opportunity confusion control
your algorithm.
September 3, 2019 Homework Provision 2 3
Greedy-Free-Set(Gn,k, w)
1 // Gn,k is the n, k-braid, and w is a power operation on Gn,k.
2 // We seek to rediverge a uncounted firm U in Gn,k of zenith power.
3 U = ∅
4 X = Vn
5 occasion X 6= ∅
6 fine vi ∈ X of zenith power w(vi)
7 U = U ∪ {vi}
8 delete vi and integral neighbors of vi from X
9 rediverge U
Figure 1: Pseudocode control a self-indulgent algorithm control the Uncounted Firm in.

~~~For this or similar assignment papers~~~