Posts

Showing posts with the label useful

L03.9 Reliability

Independence is a very useful property. Whenever it is true, we can break up complicated situations into simpler ones. In particular, we can do separate calculations for each piece of a given model and then combine the results. We're going to look at an application of this idea into the analysis of reliability of a system that consists of independent units. So we have a system that consists of a number, let's say, n, of units. And each one of the units can be "up" or "down". And it's going to be "up" with a certain probability pi. Furthermore, we will assume that unit failures are independent. Intuitively, what we mean is that failure of some of the units does not the affect the probability that some of the other units will fail. If we want to be more formal, we might proceed as follows. We could define an event Ui to be the event that the ith unit is "up". And then make the assumption that the events U1, U2, and so on u...

12.2.1 Procedures

One of the most useful abstractions provided by high-level languages is the notion of a procedure or subroutine, which is a sequence of instructions that perform a specific task. A procedure has a single named entry point, which can be used to refer to the procedure in other parts of the program. In the example here, this code is defining the GCD procedure, which is declared to return an integer value. Procedures have zero or more formal parameters, which are the names the code inside the procedure will use to refer the values supplied when the procedure is invoked by a "procedure call". A procedure call is an expression that has the name of the procedure followed by parenthesized list of values called "arguments" that will be matched up with the formal parameters. For example, the value of the first argument will become the value of the first formal parameter while the procedure is executing. The body of the procedure may define additional variables, ...