Skip to content

Suggestion on algorithm descriptions #58

@chelseas

Description

@chelseas

I think the move from pseudo-code to actual code in the textbook is nice for implementation purposes, but something was lost as well. I think it might be nice to comment the code with explanations with what's going on OR give a straightforward descrip of an algo in the text.

Consider the section on Fibonacci search in the textbook. It doesn't give a straightforward description of how the search works, e.g. you could add something like "In Fibonacci search, we pick successive evaluation points according to the Fibonacci sequence. The first two points are at Fn/Fn-1 and 1 - Fn/Fn-1 along the bracketing interval. At each successive iteration we evaluate one additional point ...we decrement n as the search progresses." Alternatively, comments to the same effect could be added inline to algo 3.2.

What's there currently under section 3.3 gives nice intuition but the closest thing to an algo description is "For n queries, the interval lengths are related to the Fibonacci sequence." Which is a rather vague starting point for the students to come up with an explicit algorithm description from. Algorithm 3.2 is nice, but the caption doesn't explain in enough detail what's going on in each line. Example 3.1 helps, but students still have to generalize from the example to an explicit pseudo-code / algo descrip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions