Results 1 to 4 of 4

Thread: Your Essential Guide to Algorithms

  1. #1
    Retired Lazarus's Avatar
    Join Date
    Jul 2002
    HSC
    2001
    Gender
    Male
    Location
    CBD
    Posts
    5,968
    Rep Power
    20

    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.
    Lazarus
    Et in arcadia ego...

  2. #2
    You can read minds? Beaky's Avatar
    Join Date
    Apr 2003
    HSC
    2003
    Gender
    Male
    Location
    Northen Beaches Position: Moderator
    Posts
    1,407
    Rep Power
    12

    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 (((())))
    Class of 03

    B Business/ B Computing @ UTS

    More Family Guy Quotes

    Brian: Hola, me Ilamo es brian ... Nosotros caramos ir condustedes.. uhhhh ...
    Bellboy(spanish): Hey, that was pretty good, except when you said "me llamo es Brian," you don't need the "es," just me llamo Brian.
    Brian: Oh, oh you speak english
    Bellboy (sigh): No, just that first speech and this one explaining it.
    Brian: You .... you're kidding me, right?
    Bellboy(spanish): Que?

  3. #3
    Rambling Spirit
    Join Date
    Aug 2002
    HSC
    2003
    Gender
    Undisclosed
    Posts
    6,130
    Rep Power
    17
    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

  4. #4
    Rambling Spirit
    Join Date
    Aug 2002
    HSC
    2003
    Gender
    Undisclosed
    Posts
    6,130
    Rep Power
    17
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •