<< Chapter < Page Chapter >> Page >

Often it is desirable to have a table of the generating minterm vectors. Use of the function minterm in a simple “for loop” yields the following m-function.

The function mintable(n) Generates a table of minterm vectors for n generating sets.

Mintable for three variables

>>M3 = mintable(3) M3 = 0 0 0 0 1 1 1 10 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1
Got questions? Get instant answers now!

As an application of mintable, consider the problem of determining the probability of k of n events. If { A i : 1 i n } is any finite class of events, the event that exactly k of these events occur on a trial can be characterized simply in terms of the minterm expansion. The event A k n that exactly k occur is given by

A k n = the disjoint union of those minterms with exactly k positions uncomplemented

In the matrix M = mintable(n) these are the minterms corresponding to columns with exactly k ones. The event B k n that k or more occur is given by

B k n = r = k n A r n

If we have the minterm probabilities, it is easy to pick out the appropriate minterms and combine the probabilities. The following example in the case of three variables illustratesthe procedure.

The software survey (continued)

In the software survey problem, the minterm probabilities are

p m = [ 0 0 . 05 0 . 10 0 . 05 0 . 20 0 . 10 0 . 40 0 . 10 ]

where A = event has word processor, B = event has spread sheet, C = event has a data base program. It is desired to get the probability an individual selected has k of these, k = 0 , 1 , 2 , 3 .

SOLUTION

We form a mintable for three variables. We count the number of “successes” corresponding to each minterm by using the MATLAB function sum, which gives the sum of each column. In thiscase, it would be easy to determine each distinct value and add the probabilities on the minterms which yield this value. For more complicated cases, we have an m-function called csort (for sort and consolidate) to perform this operation.

>>pm = 0.01*[0 5 10 5 20 10 40 10];>>M = mintable(3) M =0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 10 1 0 1 0 1 0 1>>T = sum(M) % Column sums give number T = 0 1 1 2 1 2 2 3 % of successes on each>>[k,pk] = csort(T,pm); % minterm, determines% distinct values in T and>>disp([k;pk]') % consolidates probabilities0 0 1.0000 0.35002.0000 0.5500 3.0000 0.1000

For three variables, it is easy enough to identify the various combinations “by eye”and make the combinations. For a larger number of variables, however, this may become tedious. The approach is much more useful in the case of Independent Events , because of the ease of determining the minterm probabilities.

Got questions? Get instant answers now!

Minvec procedures

Use of the tilde to indicate the complement of an event is often awkward. It is customary to indicate the complement ofan event E by E c . In MATLAB, we cannot indicate the superscript, so we indicate the complement by E c instead of E . To facilitate writing combinations, we have a family of minvec procedures (minvec3, minvec4, ..., minvec10) to expedite expressing Boolean combinations of n = 3 , 4 , 5 , , 10 sets. These generate and name the minterm vector for each generating set and its complement.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask