Order for this Paper or Similar Assignment Writing Help

Fill a form in 3 easy steps - less than 5 mins.

Posted: September 1st, 2023

CS 4104 Homework Assignment 2 Paper

CS 4104
Homework Assignment 2
Given: September 3, 2019 Due: September 13, 2019
General directions. The point value of each problem is shown in [ ]. Each solution must
include all details and an explanation of why the given solution is correct. In particular,
write complete sentences. A correct answer without an explanation is worth
no credit. The completed assignment must be submitted on Canvas as a PDF by 5:00
PM on September 13, 2019. No late homework will be accepted.
Digital preparation of your solutions is mandatory. Use of LATEX is optional, but
encouraged. No matter how you prepare your homework, please include your name.
Use of LATEX (optional, but encouraged).
• Retrieve this LATEX source file, named homework2.tex, from the course web site.
• Rename the file _solvehw2.tex, For example, for the instructor,
the file name would be heath_solvehw2.tex.
• Use a text editor (such as vi, emacs, or pico) to accomplish the next three steps.
• Uncomment the line
% setboolean{solutions}{True}
in the document preamble by deleting the %.
• Find the line
renewcommand{author}{Lenwood S. Heath}
and replace the instructor’s name with your name.
• Enter your solutions where you find the LATEX comments
% PUT YOUR SOLUTION HERE
• Generate a PDF and turn it in on Canvas by 5:00 PM on September 13, 2019.
2 Homework Assignment 2 September 3, 2019
Comment. This assignment should be more challenging than Homework Assignment 1,
so please start working on it early. It continues the use of writing in complete sentences
and writing in formal mathematical notation and begins the use of drawing digitally, in this
case to draw graphs without and with weights on vertices. As usual, pay careful attention
to the directions and ask questions on Piazza or at office hours.
It will be helpful to draw small examples of graphs to gain intuition of what is being
defined.
If you use LATEX, you can find many useful LATEX examples in the .tar files for the
lecture notes for things like pseudocode and formally stating a problem.
[60] 1. For each integer n satisfying n ≥ 1, let Vn = {v1, v2, . . . , vn} be a set of n vertices.
Let k be an integer satisfying 0 ≤ k ≤ n − 1. The n, k-braid is the undirected graph
Gn,k = (Vn, En,k) where
En,k = {(vi
, vj ) | i 6= j and |j − i| ≤ k}.
A free set in Gn,k is a set U ⊆ Vn such that no two vertices in U are adjacent. U is a
maximal free set if it is not possible to add a vertex to U and continue to have a free set.
A weight function on Gn,k is a function w : Vn → N, where N = {0, 1, 2, . . .}. If U ⊆ Vn,
then w(U) = P
vi∈U w(vi).
A. Draw G7,2, and insert your drawing into your solutions. For this drawing,
you do not need vertex weights. List three maximal free sets for G7,2.
B. The Free Set problem takes as an instance a braid Gn,k and a weight
function w on Gn,k and returns as a solution a free set U such that w(U) is
maximum among all free sets in Gn,k. State the Free Set problem in the
formal instance/solution format that we use in class.
C. Figure 1 contains pseudocode for a greedy algorithm Greedy-Free-Set
that attempts to solve the Free Set problem. Draw an instance Gn,k, w of
Free Set for which Greedy-Free-Set does not return a correct solution.
(Here, you need to assign weights to vertices in your drawing.) Explain
your result, and include your drawing in your solution PDF.
D. Use the dynamic programming paradigm from class to develop a dynamic
programming algorithm to solve the Free Set problem for the special case
where k = 1. Give CLRS pseudocode for your algorithm. You may skip
the backtrace step. Give the Θ asymptotic worst-case time complexity for
your algorithm.
E. Use the dynamic programming paradigm from class to develop a dynamic
programming algorithm to solve the Free Set problem for the special case
where k = 2. Give CLRS pseudocode for your algorithm. You may skip
the backtrace step. Give the Θ asymptotic worst-case time complexity for
your algorithm.
September 3, 2019 Homework Assignment 2 3
Greedy-Free-Set(Gn,k, w)
1 // Gn,k is the n, k-braid, and w is a weight function on Gn,k.
2 // We attempt to return a free set U in Gn,k of maximum weight.
3 U = ∅
4 X = Vn
5 while X 6= ∅
6 select vi ∈ X of maximum weight w(vi)
7 U = U ∪ {vi}
8 delete vi and all neighbors of vi from X
9 return U
Figure 1: Pseudocode for a greedy algorithm for the Free Set problem.

Tags: , , , , , , , ,

Why choose us

You Want Quality and That’s What We Deliver

Top Skilled Writers

Our writing team is assembled through a rigorous selection process, where we handpick accomplished writers with specialized expertise in distinct subject areas and a proven track record in academic writing. Each writer brings a unique blend of knowledge and skills to the table, ensuring that our content is not only informative but also engaging and accessible to a general college student audience

Discounted Prices

Competitive pricing is a cornerstone of our service, where we balance affordability with exceptional quality. In offering the best writers at rates that rival other writing services, we ensure that students can access top-notch content without breaking the bank unnecessarily. Our fair and transparent pricing structure is designed to provide value for money, making us a go-to choice for students seeking high-quality writing services at an affordable price.

100% Plagiarism-Free

Academic integrity is paramount to our writing service, which is why we produce original research and writing content for every paper. Each piece of work is carefully written from scratch, ensuring that every sentence, paragraph, and page is authentic and free from plagiarism. Our rigorous quality control process involves thorough scanning of every final draft, guaranteeing that the content meets the highest standards of originality and academic integrity. With keen attention to citation and referencing, we ensure that every source is properly credited, giving you complete peace of mind. We also have the best plagiarism checkers like safeassign and turnitin thus providing similarity score for each paper.

How it works

When you decide to place an order with Dissertation Help, here is what happens:

Complete the Order Form

You will complete our order form, filling in all of the fields and giving us as much detail as possible.

Assignment of Writer

We analyze your order and match it with a writer who has the unique qualifications to complete it, and he begins from scratch.

Order in Production and Delivered

You and your writer communicate directly during the process, and, once you receive the final draft, you either approve it or ask for revisions.

Giving us Feedback (and other options)

We want to know how your experience went. You can read other clients’ testimonials too. And among many options, you can choose a favorite writer.