Instructor Solutions to the "Real World Application" Problems
(Last Mod: 27 November 2010 21:38:39 )
Most chapters in the text contain a few sections devoted to what the authors call "Real World Applications". While the appropriateness of this name can be debated, most of these sections do show how the material covered thus far is used to solve a stated problem.
But beyond that, material that is not covered in detail until much later in the text is frequently first presented and discussed in these sections. This is the authors' way to introduce material that is needed to write anything beyond the most trivial programs as early as possible but keeping the level of coverage very minimal and in the context of how it is useful to solve the problem being worked.
For this reason, these sections are not optional. If you skip them you will skip material that you need and that it will be assumed you have been exposed to. But neither will we focus very much time on them in class - many of them we will not discuss at all in class. You are expected to read through them and be conversant with any new material presented in them. But even more so, you are highly encouraged to actually work the problem yourself and then compare your solution to the authors'. Consider these to be "worked examples" that are there for your benefit.
To hopefully increase the effectiveness of these sections with respect to your own learning, this page provides links to program listings for many of these problems. These have been done in compliance with the same guidelines that apply to your homework and can therefore serve as examples of how you might present your work.
These solutions almost always vary from those presented by the authors - sometimes significantly - in that that they were worked starting strictly from the given problem statement. This highlights the open-ended nature of even the simplest problems. In some instances, the work presented here represents a solution that is pretty much the minimum that would be acceptable for full credit while in other cases the work goes significantly beyond the minimum in order to demonstrate various alternatives or potential enhancements. In other instances, the problem has been modified somewhat from the original in order to illustrate a concept that the original problem statement didn't lend itself to. The bottom line is to use all of this as a tool for your learning and not some sort of "answer key".
SEC | PROBLEM | SOURCE |
2.2 | Computing Distances | rwa_0202.c |
2.6 | Classifying Solutions as Acidic or Nonacidic | rwa_0206.c |
3.5 | Statistical Measures | rwa_0305.c |
3.8 | Printing a Bar Graph | rwa_0308.c |
4.2 | Generating Prime Numbers | rwa_0402.c |
4.6 | Printing a Calendar | rwa_0406.c |
4.8 | Summing a Series | rwa_0408.c |
5.4 | Computing Resistance | rwa_0504.c |
5.7 | Monte Carlo Integration | rwa_0507.c |
5.9 | Recursive Tiling | rwa_0509.c |
6.3 | The Fourier Transform | rwa_0603.c |
6.7 | Computing a String's Length | rwa_0607.c |
6.9 | Matrix Multiplication | rwa_0609.c |
6.10 | Solving a Linear System of Equations | rwa_0610.c |
6.11 | Sorting and Searching | rwa_0611.c |
6.12 | Forest Fire Percolation | rwa_0612.c |
7.5 | Reversing a String in Place | rwa_0705.c |
7.9 | Comparing Sorting Algorithms | rwa_0709.c |
7.10 | Sorting and Searching Revisited | rwa_0710.c |
8.4 | An Interactive Calculator | rwa_0804.c |
8.8 | A Scheduling Problem | rwa_0808.c |
9.3 | Determining a Source File's Size in Bytes | rwa_0903.c |
9.8 | A Random Access File | rwa_0908.c |
10.2 | Complex Numbers | rwa_1002.c |
10.7 | Chemical Synthesis | rwa_1007.c |
11.2 | Matrix Multiplication Revisited | rwa_1102.c |
11.8 |
Fractals |
rwa_1108.c |