CSC302 2011S Programming Languages

Assignment 6: Erlang

Assigned: Saturday, 26 February 2011
Due: 11:00 p.m., Saturday, 5 March 2011

This assignment is also available in PDF.

Summary: In this assignment, you will explore parallelism in Erlang.

Purposes: To give you more experience with Erlang. To give you more experience with parallel programming.

Expected Time: Three to four hours.

Collaboration: I would prefer that you work on this assignment in groups of two or three. You may also work on this assignment alone or in groups of up to size four. You may consult with anyone you wish on this assignment (including other classmates), provided you cite your consultants.

Submitting: Upload a tarball to Pioneerweb.

Warning: So that this assignment is a learning experience for everyone, I may spend class time publicly critiquing your work.


Implement the following functions that each use K processes (where K is a parameter to the function). Your goal is to minimize the total amount of work on the processor that does the most work. (Hence, it's okay to do more work, as long as the max is low.)

You may substitute a tuple for a list in any of the functions.

Important Evaluation Criteria

I will look at the standard C criteria: Is your code correct? Is your code concise? (This second attribute is particularly appropriate in Ruby.) Is your code appropriately commented? Have you used any particularly clever techniques. How comely is your code?

Submitting Your Homework

Create a directory for this assignment of the form hw06.names. Within that directory, create subdirectories for each part of the assignment (e.g., part0, part1). Each subdirectory should contain:

Make a gzipped tarball of the assignment directory. (If you don't know how to do that, let me know.) Upload it via the Assignment 6 link on Pioneerweb.



Saturday, 26 February 2011 [Samuel A. Rebelsky]

  • Created.

Monday, 28 February 2011 [Samuel A. Rebelsky]

  • Switched data type from tuples to lists b/c tuples seem to be pure, and are therefore not ideal for what we're doing.

Wednesday, 2 March 2011 [Samuel A. Rebelsky, with assistance from CSC302 students]


Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Wed Mar 2 09:05:06 2011.
The source to the document was last modified on Wed Mar 2 09:05:04 2011.
This document may be found at

You may wish to validate this document's HTML ; Valid CSS! ; Creative Commons License

Samuel A. Rebelsky,