The Traveling Salesman Problem Given a collection of cities, along with pairwise

The Traveling Salesman Problem
Given a collection of cities, along with pairwise

The Traveling Salesman Problem
Given a collection of cities, along with pairwise distances between the cities, what is the
shortest route that visits each city exactly once and returns the the starting city? This
question is commonly referred to as the traveling salesman problem (TSP). The traveling
salesman problem can be reformulated as finding a Hamiltonian cycle of least cost in a
weighted graph — a Hamiltonian cycle is a cycle that includes every vertex in the graph.
This assignment will focus on a brute-force solution to the traveling salesman problem.
Program Specifications
You will write a C++ program to implement a brute-force, permutation-based solution for
the traveling salesman problem. Your program will take in a single command line input
specifying a file to read. The input file will contain one or more lines, each of which specifies
a directed edge the form “src dst wt” where src and dst are non-negative integers indicating
the source and destination vertices of the edge, and wt is the weight of the edge. I will
provide you with sample input files for testing, but it is your responsibility make sure that
your program behaves correctly on any valid input file. Your program will output the cost
of the minimum Hamiltonian cycle. See the end of this handout for example output.
You will need to implement your own adjacency matrix or adjacency list structure to store the
graph. Take care not to over engineer your data structure — you do not need to write a full
class to implement your graph data structure. I suggest that you rely on standard template
library containers for your implementation (see https://cplusplus.com/reference/stl/). For
instance
• std::vector > adj matrix;
• std::vector > adj list;
Regardless of the data structure you choose, do not hard-code limits on your data structure
size. Also, please note that variable-length arrays (VLAs) are not part of the C++ standard
and should not be used. For your solution, you make use the std::next permutation
function.
Submission and Grading
You must use skeleton3.cpp (see iLearn) as a starting point for your program, and complete
the TSP function; feel free to create any additional helper functions or include any additional
standard libraries that you need, but do not modify any other existing functions. Your
source code should be contained in a single file and should be named after your TTU email
address excluding the “@tntech.edu” (e.g., jagraves21.cpp). All submissions will be made
on iLearn — please do not zip or compress your files. Make sure to follow best coding
practices (proper naming conventions, useful comments, etc.). Your program should compile
without errors or warnings. Programs will be compiled using the following command:
g++ -Wall -pedantic -std=c++11 [source file]
Sample Output
The following lines contain sample input and expected output to your programs. Please note
that these examples are not exhaustive, and you should verify your programs with additional
test cases.
$ ./a.out graph1.txt
18
$ ./a.out graph2.txt
14
$ ./a.out graph3.txt
No Hamiltonian cycle exists.

[50 points] Evaluate the complexity of the LOOOOOOOOOOP kernel using the notati

[50 points] Evaluate the complexity of the LOOOOOOOOOOP kernel using the
notati

[50 points] Evaluate the complexity of the LOOOOOOOOOOP kernel using the
notation. The many possible values for Istart, Iend, Iincrement, Jstart, Jend, and Jincrement
are given in the table.
LOOOOOOOOOOP(n)
1. for i Istart; i Iend; Iincrement do
2.
for j Jstart; j Jend; Jincrement do
3.
do nothing
Program
Istart
Iend
Iincrement
Jstart
Jend
Jincrement
1 2 n i i+2 2 n j j+2
2 2 n i i+2 2 n j j 2
3 2 n i i+2 2 n j j2
4 2 n i i 2 2 n j j+2
5 2 n i i 2 2 n j j 2
6 2 n i i 2 2 n j j2
7 2 n i i2 2 n j j+2
8 2 n i i2 2 n j j 2
9 2 n i i2 2 n j j2
10 2 n i i+2 2 i j j+2
11 2 n i i+2 2 i j j 2
12 2 n i i+2 2 i j j2
13 2 n i i 2 2 i j j+2
14 2 n i i 2 2 i j j 2
15 2 n i i 2 2 i j j2
16 2 n i i2 2 i j j+2
17 2 n i i2 2 i j j 2
18 2 n i i2 2 i j j2
19 2 n i i+2 2 i j i+j
20 2 n i i+2 2 i j i j
1
2. [10 points] Given an array A[1 n] where n 2containing integers from 1 to n 1
inclusive, exactly one of which is repeated, we need to find and return this integer
that is repeated.
(i) Design a On2 time algorithm FINDREPEATEDNUMBER-NAIVE(A[1 n]) to
solve the problem.
(ii) Design a O(n) time constant extra space algorithm FINDREPEATEDNUMBER
EFFICIENT(A[1 n]) to solve the problem.
3. [10 points] Given an array of integers A[1 n], we need to push all square num
bers in the array to the front of the array and the non-square numbers to the
end. Assume that you are given a function ISPERFECTSQUARE(k) that checks if
a given number k is a square number or not in O(1) time.
(i) Design a On2 time, O(1) extra space algorithm GROUPING-NAIVE(A[1 n]) to
solve the problem.
(ii) Design a (n) time, O(n) extra space algorithm GROUPING-BETTER(A[1 n])
to solve the problem.
(Surprisingly, there is a much better (n)time, (1)extraspacealgorithm GROUPING
BEST(A[1 n])tosolve the problem. You will learn about this beautiful algorithm
in the algorithms course.)
4. [10 points] Suppose prisoners numbered 123
n are standing in a circle in
the clockwise order. Starting from the first prisoner, every kth prisoner in the
clockwise direction is killed in every step. We would like to compute the jthperson
to be killed.
(i) Design a natural algorithm JOSEPHUSPROBLEM-ARRAY(nk j) using an array
to solve the problem.
(ii) Design a natural algorithm JOSEPHUSPROBLEM-CSLL(nk j)usingcircularly
singly linked list to solve the problem.
5. [10 points] Given an array of integers A[1 n], we want to maximize A[i] A[j]
such that i < j. Assume that you are given a function SORT(A[1 n]) that sorts the array in-place in nlogn time and (n) extra space. (i) Design a n2 time, (1)extraspacealgorithm MAXIMIZEPRODUCT-NAIVE(A[1 n]) to solve the problem. (ii) Design a nlogn time, (n)extraspacealgorithm MAXIMIZEPRODUCT-BETTER(A[1 n]) to solve the problem. (iii) Design a (n)time, (1)extraspacealgorithm MAXIMIZEPRODUCT-BEST(A[1 n]) to solve the problem. 6. [10 points] Given two circularly singly linked lists, design a quadratic time al gorithm to find if the two lists store the same sequence of elements but perhaps with different starting points.

Student Learning Goal: I’m working on a data analytics question and need support

Student
Learning Goal: I’m working on a data analytics question and need support

Student
Learning Goal: I’m working on a data analytics question and need support to help me learn.
Please complete the following 4 Dow questions from the attached pdf file reading under Dow Chemical Co.: big data in Manufacturing Page 1-15.
Require high quality work, be precise with answers.
Please reach out to me if you have any further question.
Thank You
Requirements: 4q

Customer Service Management System The FinTech company “Alpha” is proposing a ne

Customer Service Management System
The FinTech company “Alpha” is proposing a ne

Customer Service Management System
The FinTech company “Alpha” is proposing a new customer service management system. The system will handle customer requests for support. The customer initiates a support ticket by sending an email to the customer support department. Then, the system assigns a ticket number. The ticket will then be evaluated. Valid tickets will be resolved. Otherwise, a rejection notice will be sent to the customer detailing the reason for rejecting the support ticket.
The system should keep track of all the tickets, and a weekly report will be generated and sent to the Management. Some support tickets require the finance team to refund payments to the customers. In that case, a refund request will be sent to the finance team that either accept or reject the request as a refund request notice. If the refund request is accepted then a refund notice will be sent to the customer. The system should keep track of all the refund requests that will be part of the weekly report. Your answer must include a screenshot of the complete Context Diagram along with the link generated from the LucidChart
Please refer to slides 7 to 24

Using the Master’s theorem,determine the running time of Strassen’sAlgorithm and

Using the Master’s theorem,determine the running time of Strassen’sAlgorithm and

Using the Master’s theorem,determine the running time of Strassen’sAlgorithm and show that it is faster than the standard algorithm that runs in Θ(n3) time.
Don’t use ChatGPT!!!!

Hello, Check the images for details. I need the full assignment. submission must

Hello,
Check the images for details.
I need the full assignment.
submission must

Hello,
Check the images for details.
I need the full assignment.
submission must consist of both:
1 zip file of the IntelliJ project – Only IntelliJ project are accepted.
1 txt file of the java code uploaded – Assignment1.java.txt

Please find questions below. Do not accept this work unless you can guarantee a

Please find questions below.
Do not accept this work unless you can guarantee a

Please find questions below.
Do not accept this work unless you can guarantee a 100%.
Let me know if you are familiar with the questions so I can send further instructions.

Please find questions below. Do not accept this work unless you can guarantee a

Please find questions below.
Do not accept this work unless you can guarantee a

Please find questions below.
Do not accept this work unless you can guarantee a 100%.
Let me know if you are familiar with the questions so I can send further instructions.