Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please you Java and explain as you go so I can prepare the report. Objective: 1. The objective of this programming assignment is to implement
please you Java and explain as you go so I can prepare the report.
Objective: 1. The objective of this programming assignment is to implement in your preferred language an algorithm to compute the transpose of an nxn matrix. We are interested in exploring the relationship between the time complexity and the "real time". For this exploration, you will collect the execution time T(n) as a function of n and plot T(n), T(n)', and T(n)' on the same graph. Finally, discuss your results. Program to implement collectData() Generate an LXL matrix G with a HUGE L (as huge as your language and machine allow) with random values // This must be done once for n = 100 to L (with step 100) copy in an nxn Matrix A the nxn upper left matrix from Matrix G Start timing // We time the transposition of Matrix A for i = 1 to n-1 for j = 1+1 ton // swap A[i] and Aljl buffer = A[i][j] A[i][j] = Al][i] Alil[i] = buffer Store the value n and the values T(n), T(n), and I (n) in a file F where T(n) is the execution time. Data Analysis Use any plotting software (e.g., Excel) to plot the values T(n), T(n)?, and T(n)'in File F as a function of n (on the same graph). File F is the file produced by the program you implemented. Discuss your results based on the plot. (Hint: is T(n) closer to K.n, K.n2, or K. n).log(n) where K is a constant?) How to Plot? I suggest to store the values in File F following the csv format used by Excel. Once the file F is in csv format, you can use Excel to plot. If you do not know the csv format, google "csv format". Do not hesitate to ask for help if you need. Report Write a report that will contain, explain, and discuss the plot(s). The report should not exceed one page. In addition, your report must contain the following information: o whether the program works or not (this must be just ONE sentence) the directions to compile and execute your program Good writing is expected. Recall that answers must be well written, documented, justified, and presented to get full credit. Make sure that the TA has complete instructions/directions to compile and execute your program. OStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started