Pseudocode Analyze and Synthesize Discussion
Question Description
Overview
Analyze and synthesize pseudocode for an IT company.
This assessment is particularly important to the areas of IT and computer science, as both use a number of different programming languages to complete tasks via algorithms. You will demonstrate your ability to interpret and create algorithms and read and understand pseudocode (that is, English-like programming code).Pseudocode Analyze and Synthesize Discussion
Context
The Assessment 4 Context document contains information about algorithms, including recursion, as well as pseudocode and basic programming principles.
Resources
SUGGESTED RESOURCES
The following optional resources are provided to support you in completing the assessment or to provide a helpful context. For additional resources, refer to the Research Resources and Supplemental Resources in the left navigation menu of your courseroom.
Binary and Hexadecimal Expansions and Operations.
Read this document to learn about binary, decimal, and hexadecimal number systems and Microsoft Excel’s conversion tool.Pseudocode Analyze and Synthesize Discussion
Algorithms | Transcript.
This presentation includes the following topics:
Characteristics of algorithms.
Notation for algorithms.
The Euclidean algorithm.
Recursive algorithms.
Complexity of algorithms.
Number Theory and Recurrence Relations | Transcript.
This presentation includes the following topics:
Number systems.
Hexadecimal number system.
Recurrence relation.
Fibonacci sequence.
Towers of Hanoi.
Solving recurrence relations.
Library Resources
The following e-book from the Capella University Library is linked directly in this course:
Koshy, T. (2004). Discrete mathematics with applications. Burlington, MA: Elsevier Academic Press.
Chapters 4 and 5.
The resource listed below is relevant to the topics and assessments in this course and is not required. Unless noted otherwise, this resource is available for purchase from the.
Johnsonbaugh, R. (2018). Discrete mathematics (8th ed.). New York, NY: Pearson.
The following chapters and sections are particularly useful for your work in this assessment.
Chapter 4, “Algorithms,” sections 4.1 through 4.3. This chapter allows you to look at examples of algorithms, analyze algorithms, and work with recursive algorithms.
Chapter 4, “Algorithms,” sections 4.3 and 4.4. Section 4.4 focuses on recursive algorithms.
Chapter 5, “Introduction to Number Theory.” This chapter focuses on divisors, representations of integers and integer algorithms, the Euclidean algorithm, and the RSA public-key cryptosystem.
Chapter 7, “Recurrence Relations.” This chapter focuses on solving recurrence relations and applications to the analysis of algorithms.
Appendix C, “Pseudocode.”
Assessment Instructions
Assume that you are an IT professional working at an IT company. You have been asked to assess some snippets of code/pseudocode. Read over the pseudocode samples below and answer the corresponding questions.
PSEUDOCODE SAMPLE 1 AND QUESTIONS
// Description
// number is a positive integer with n digits, where numberi refers to the ith digit of number
// n is the number of digits of c
// base is a positive integerfunction conversion(number,base,n)
value = 0;
unit = 1;
for i = 0 to n
value = value + numberi * unit;
unit = unit * base;
end
return value;Respond to the following:
What does the conversion function do? Please provide a detailed response.
In terms of n, how many computational steps are performed by the conversion function? Note: One computational step is considered one operation: one assignment, one comparison, et cetera. For example, the execution of a = c + d may be considered two computational steps: one addition and one assignment.
What is the Big-O time complexity of the conversion function in terms of n? Justify your response.
PSEUDOCODE SAMPLE 2 AND QUESTIONS
function printToScreen(n)
for i = 1 to n
for j = 1 to i
print(“*”);
end
print(“\n”);
endRespond to the following:
What does the printToScreen function do? Please provide a detailed response. Specifically, describe the pattern formed by the *’s being printed. Note that print(“*”) will print one star and print(“\n”) will print a carriage return, which effectively brings the cursor to a new line.
In terms of n, how many computational steps are performed by the printToScreen function? Justify your response. Note: One computational step is considered one operation: one assignment, one comparison, et cetera. For example, the execution of print(“Hello”) may be considered one computational step: one print operation.
What is the Big-O (worst-case) time complexity of the printToScreen function in terms of n? Justify your response.
PSEUDOCODE SAMPLE 3 AND QUESTIONS
// n is a non-negative integerfunction f(n)
if n == 0 || n == 1
return 1;
else
return n*f(n-1);Respond to the following:
What does the f function do? Please provide a detailed response.
In terms of n, how many computational steps are performed by the f function? Justify your response. Note: One computational step is considered one operation: one assignment, one comparison, et cetera. For example, the execution of 3*3 may be considered one computational step: one multiplication operation.
What is the Big-O (worst-case) time complexity of the f function in terms of n? Justify your response.
Define a recurrence relation an, which is the number of multiplications executed on the last line of the function f, “return n*f(n-1);”, for any given input n. Hint: To get started, first determine a1, a2, a3 …. From this sequence, identify the recurrence relation and remember to note the initial conditions.
PSEUDOCODE SYNTHESIS
Write pseudocode for a function called swapLarge. This function has an input 3 integers: x, y, and z. The algorithm will swap the values of two of these variables. Specifically, it will swap the largest value and the second largest value. For example, if x = 1, y = 2, and z = 3, then the output would be x = 1, y = 3, and z = 2.
Algorithms Scoring Guide
CRITERIA
DISTINGUISHED
Derive recurrence relation including initial conditions.
Derives recurrence relation including initial conditions and relates derivation to algorithm time complexity analysis.
Analyze purpose of recursive and non-recursive algorithms.
. Analyzes purpose of recursive and non-recursive algorithms and evaluates its efficiency.
Analyze the time complexity of recursive and non-recursive algorithms via computational steps and Big-O.
. Analyzes the time complexity of recursive and non-recursive algorithms via computational steps and Big-O and clearly derives Big-O as an upper-bound of the expression of computational steps.
Synthesize pseudocode as instructed.
Synthesizes pseudocode as instructed and integrates best coding practices and efficient design schemes.
attachment_1
attachment_2
attachment_3
attachment_4
You must proofread your paper. But do not strictly rely on your computer’s spell-checker and grammar-checker; failure to do so indicates a lack of effort on your part and you can expect your grade to suffer accordingly. Papers with numerous misspelled words and grammatical mistakes will be penalized. Read over your paper – in silence and then aloud – before handing it in and make corrections as necessary. Often it is advantageous to have a friend proofread your paper for obvious errors. Handwritten corrections are preferable to uncorrected mistakes.
Use a standard 10 to 12 point (10 to 12 characters per inch) typeface. Smaller or compressed type and papers with small margins or single-spacing are hard to read. It is better to let your essay run over the recommended number of pages than to try to compress it into fewer pages.
Likewise, large type, large margins, large indentations, triple-spacing, increased leading (space between lines), increased kerning (space between letters), and any other such attempts at “padding” to increase the length of a paper are unacceptable, wasteful of trees, and will not fool your professor.
The paper must be neatly formatted, double-spaced with a one-inch margin on the top, bottom, and sides of each page. When submitting hard copy, be sure to use white paper and print out using dark ink. If it is hard to read your essay, it will also be hard to follow your argument.Pseudocode Analyze and Synthesize Discussion
ADDITIONAL INSTRUCTIONS FOR THE CLASS
Discussion Questions (DQ)
Initial responses to the DQ should address all components of the questions asked, include a minimum of one scholarly source, and be at least 250 words.
Successful responses are substantive (i.e., add something new to the discussion, engage others in the discussion, well-developed idea) and include at least one scholarly source.
One or two sentence responses, simple statements of agreement or “good post,” and responses that are off-topic will not count as substantive. Substantive responses should be at least 150 words.
I encourage you to incorporate the readings from the week (as applicable) into your responses.
Weekly Participation
Your initial responses to the mandatory DQ do not count toward participation and are graded separately.
In addition to the DQ responses, you must post at least one reply to peers (or me) on three separate days, for a total of three replies.
Participation posts do not require a scholarly source/citation (unless you cite someone else’s work).
Part of your weekly participation includes viewing the weekly announcement and attesting to watching it in the comments. These announcements are made to ensure you understand everything that is due during the week.
APA Format and Writing Quality
Familiarize yourself with APA format and practice using it correctly. It is used for most writing assignments for your degree. Visit the Writing Center in the Student Success Center, under the Resources tab in LoudCloud for APA paper templates, citation examples, tips, etc. Points will be deducted for poor use of APA format or absence of APA format (if required).
Cite all sources of information! When in doubt, cite the source. Paraphrasing also requires a citation.
I highly recommend using the APA Publication Manual, 6th edition.
Use of Direct Quotes
I discourage overutilization of direct quotes in DQs and assignments at the Masters’ level and deduct points accordingly.
As Masters’ level students, it is important that you be able to critically analyze and interpret information from journal articles and other resources. Simply restating someone else’s words does not demonstrate an understanding of the content or critical analysis of the content.
It is best to paraphrase content and cite your source.
LopesWrite Policy
For assignments that need to be submitted to LopesWrite, please be sure you have received your report and Similarity Index (SI) percentage BEFORE you do a “final submit” to me.
Once you have received your report, please review it. This report will show you grammatical, punctuation, and spelling errors that can easily be fixed. Take the extra few minutes to review instead of getting counted off for these mistakes.
Review your similarities. Did you forget to cite something? Did you not paraphrase well enough? Is your paper made up of someone else’s thoughts more than your own?
Visit the Writing Center in the Student Success Center, under the Resources tab in LoudCloud for tips on improving your paper and SI score.
Late Policy
The university’s policy on late assignments is 10% penalty PER DAY LATE. This also applies to late DQ replies.
Please communicate with me if you anticipate having to submit an assignment late. I am happy to be flexible, with advance notice. We may be able to work out an extension based on extenuating circumstances.
If you do not communicate with me before submitting an assignment late, the GCU late policy will be in effect.
I do not accept assignments that are two or more weeks late unless we have worked out an extension.
As per policy, no assignments are accepted after the last day of class. Any assignment submitted after midnight on the last day of class will not be accepted for grading.
Communication
Communication is so very important. There are multiple ways to communicate with me:
Questions to Instructor Forum: This is a great place to ask course content or assignment questions. If you have a question, there is a good chance one of your peers does as well. This is a public forum for the class.
Individual Forum: This is a private forum to ask me questions or send me messages. This will be checked at least once every 24 hours.