Your Essential Guide to Algorithms (1 Viewer)

Status
Not open for further replies.

Lazarus

Retired
Joined
Jul 6, 2002
Messages
5,965
Location
CBD
Gender
Male
HSC
2001
Methods of Algorithm Description

This is an official BOS document from the old 3u Computing Studies course.

It is an excellent resource for algorithms in SDD. Here is an excerpt describing what it includes -

The preliminary section consists of a description of the programming process and some definitions of an algorithm presented in the form of overhead transparency originals. In the following section are descriptions of the main features of two methods of algorithm description: pseudocode and flowcharts. Descriptions and specific examples of the programming structures of sequence, selection, repetition and subprograms (procedures or subroutines) are given.

The most substantial section of the document contains sample problems and worked solutions that show the use of each of the methods of algorithm description. The solutions do not purport to describe the 'ultimate' solution, but rather one (or more) possible solutions to the problem.


The document also includes standard algorithms for searching and sorting.

You can download it HERE.

NOTE: This document does not cover FOR ... NEXT loops, arrays, or processing records from a sequential file. They are in the syllabus.
 

Beaky

You can read minds?
Joined
Apr 5, 2003
Messages
1,407
Location
Northen Beaches Pos
Gender
Male
HSC
2003
Algorithim Resource thread

Any past or present students that want to help people with algorithims this thread is the one...

I am uploading my algorithim resource that I used during my exams... I suggest u keep a pre-defined library of algorithim code for you to reference back if you are struggling with algorithims

Remember to use pseudocode if you can and everyones code is different hence pseudocode ( false code )

Ok chow... btw my algo resource needs to be revised and spell checked... will put up a revised copy soon

Beaky (((())))
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Approaching algorithims by Sam Davis

The main problem is that every algorithm question is different. Writing algorithms is not something you can learn by rote and just spew out an answer. However you do need to understand the principles behind each of the standard searches and sorts. Some possible tips include:

- Try to solve a simpler case of the question first. For example work out how to process a single record first and then add the loops to iterate around through the whole record set and then generalise any constants by changing them to variables.

- Design data structures first. That is, write down the structure of any arrays or records you'll be using. This helps you maintain focus while you construct your algorithm and it also gives the marker a clearer understanding of where your answer is headed.

- The best answers solve the problem in the most efficient manner. If you think you've solved it then when checking think about ways to get out of loops as soon as the vital processing is done. For example setting a flag and using it as part of your loop condition. This can make the difference between 5/6 and 6/6.

- Generally better answers tend to be written in pseudocode. Pseudocode has the advantage of restricting you to standard control structures. Its also easier to slot in or remove statements here and there as you check your answer.

- If you're stuck then think in terms of simple example data. If you can actually do the processing on some example data then write down how you do that in step by step form. This will likely gain you a few marks and it may just allow you to formulate a more generalised algorithm.

- If you really have no idea then as a last resort reword the question in step by step form. Many algorithm questions are quite specific, and even the question itself contains a series of steps. Remember the aim is to rank student responses, at least you've shown that you understood the question whereas writing nothing always results in a zero.

- Everyone makes stupid mistakes. The best time to spot these is later on. Plan to have time at the end of the exam to reread all your answers, particularly the algorithms.

HTH
Sam Davis
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Writing Algorithms Part II By: Sam Davis


Every algorithm question is different. Writing algorithms is not something you can learn by rote and just spew out an answer. However you do need to understand the principles behind each of the standard searches and sorts. Some possible tips include:
- Try to solve a simpler case of the question first. For example work out how to process a single record first and then add the loops to iterate around through the whole record set and then generalise any constants by changing them to variables.
- Design data structures first. That is, write down the structure of any arrays or records you'll be using. This helps you maintain focus while you construct your algorithm and it also gives the marker a clearer understanding of where your answer is headed.
- The best answers solve the problem in the most efficient manner. If you think you've solved it then when checking think about ways to get out of loops as soon as the vital processing is done. For example setting a flag and using it as part of your loop condition. This can make the difference between 5/6 and 6/6.
- Generally better answers tend to be written in pseudocode. Pseudocode has the advantage of restricting you to standard control structures. Its also easier to slot in or remove statements here and there as you check your answer.
- If you're stuck then think in terms of simple example data. If you can actually do the processing on some example data then write down how you do that in step by step form. This will likely gain you a few marks and it may just allow you to formulate a more generalised algorithm.
- If you really have no idea then as a last resort reword the question in step by step form. Many algorithm questions are quite specific, and even the question itself contains a series of steps. Remember the aim is to rank student responses, at least you've shown that you understood the question whereas writing nothing always results in a zero.
- Everyone makes stupid mistakes. The best time to spot these is later on. Plan to have time at the end of the exam to reread all your answers, particularly the algorithms.

HTH
Sam
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top