Download Understanding Algorithms: Definition, Properties, and Examples and more Cheat Sheet Professional Communication in PDF only on Docsity! (2 UNIVERSITY of
is/ GREENWICH
Alliance with aGs. Education
Higher Nationals in Computing Unit 1: Programming ASSIGNMENT 1 Learner’s name: Nguyen Thuy My ID: GCS200555 Class: GCS0905C Subject code: 1618 Assessor name: PHAN MINH TAM Assignment due: Assignment submitted: Assignment Brief 1 (RQF) Higher National Certificate/Diploma in Computing Student Name/ID Number: Nguyen Thuy My/GCS200555 Unit Number and Title: Unit 1: Programming Academic Year: 2021 – 2022 Unit Assessor: Phan Minh Tam Assignment Title: Problem solving with algorithms Issue Date: 27 September 2021 Submission Date: Internal Verifier Name: Date: Submission Format: Format: ● The submission is in the form of an individual written report. This should be written in a concise, formal business style using single spacing and font size 12. You are required to make use of headings, paragraphs and subsections as appropriate, and all work must be supported with research and referenced using the Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. Submission ● Students are compulsory to submit the assignment in due date and in a way requested by the Tutor. ● The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/ . ● Remember to convert the word file into PDF file before the submission on CMS. Note: ● The individual Assignment must be your own work, and not copied by or from another student. ● If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must reference your sources, using the Harvard style. ● Make sure that you understand and follow the guidelines to avoid plagiarism. Failure to comply this requirement will result in a failed assignment. Unit Learning Outcomes: LO1 Define basic algorithms to carry out an operation and outline the process of programming an application Assignment Brief and Guidance: Assignment scenario You have applied for a post as a trainee with a software development company and have been invited for an interview. You have been asked to demonstrate your problem solving and basic programming skills. To do this you have to prepare a report on using algorithms to solve problems. You need to explain, using examples, how algorithms are used to solve simple business problems and the steps needed to be followed to produce a working program solution. You should make clear your assumption about your program. The problems to be solved will involve basic procedural programming instructions - sequence instructions (input, output and assignment statements), loops, conditional statements. Problems should be analysed and designed by the use of flowchart and demonstrated by the use of modules (procedures). Tasks: State your simple business problems to be solved. Analyse the problem and design the solutions by the use of suitable methods. Demonstrate the compilation and running of a program Evaluate how the problem is solved from the designed algorithm to the execution program written by a specific programming language. Learning Outcomes and Assessment Criteria Pass Merit Distinction LO1 Define basic algorithms to carry out an operation and outline the process of programming an application P1 Provide a definition of M1 Determine the steps taken D1 Examine the what an algorithm is and outline the process in building an application. from writing code to execution. implementation of an algorithm in a suitable language. Evaluate the relationship between the written algorithm and the code variant. 1.2. Algorithm properties An algorithm would consist of the following components: Accuracy: It is the most critical component in achieving successful outcomes and operations. Clarification: The method is based on the commands. As a result, the algorithm should be presented in a clear, easy-to-understand manner and in a certain order. Universality: The algorithm must be very applicable. It is utilized to solve a wide range of issues, not just specific ones. Objectivity: The algorithm, no matter how it is implemented, always yields only one answer. If there is a different answer from the person who implements the algorithm or the computer, it should be reconsidered Termination: Because an algorithm is a finite set, it always has an endpoint, as shown in the What is an algorithm section. When a match is discovered, this is interpreted as the endpoint. 1.3. Some Algorithms There are many algorithms, such as: For almost any kind of math problem to solve Numerical algorithms. Algebraic algorithms. Geometric algorithms. Sequential algorithms. Operational algorithms. Theoretical algorithms. Various algorithms are named after the top mathematicians who invented them Shor’s algorithm. Girvan-Newman algorithm. P a g e | 2 Several Euclidian algorithms. Algorithms are named after the specific problem they solve Bidirectional search algorithm. K-way merge algorithm. 1.4. Example of algorithms “Find the second largest value of 10 interger numbers entered from the keyboard” To implement the algorithm and produce its results, we have: Input: 10 integers entered from the keyboard Output: the second value of the sequence Algorithm solving process: After solving the above algorithm, the result of the main algorithm is MAX2 P a g e | 3 STEP 1: STAR STEP 2: Decalera MAX = 0, Array B[10] STEP 3: Set variable i = 0 STEP 4: for i < length of array B, repeat STEP 5 STEP 5: Read B [i] STEP 6: if N[i] > MAX is true then STEP 6.1: Set MAX= B[i] STEP 8: Read MAX STEP 9: Decalera MAX2 = 0 STEP 10: for i < length of array B, repeat STEP 5 STEP 11: Read B[i] STEP 12: if B[i] > MAX2 and B[i] < MAX is true then STEP 12.1: Set MAX2 = B[i] Step 13: Print MAX2 STEP 14: STOP 6B UNIERSITY 4 Pd
sian “BTEC
2. Algorithm
Page |4