Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 2 :Bacteria number estimation ( this question is for assignment so please make sure it is different by all means because so many people

Exercise 2:Bacteria number estimation(this question is for assignment so please make sure it is different by all means because so many people will be using chegg as it is the trusted source in the world, and also use c only, thanks in advance)
Microbiologist estimating the number of bacteria in a sample that contains bacteria that do not grow well on solid media may
use a statistical technique called the nu most probable number (MPN) method. Each of five tubes of nutrient medium receives
10 ml of the sample. A second set of five tubes receives 1 ml of sample per tube, and in each of the a third set of five tubes,
only 0.1 ml of sample is placed. Each tube in which bacterial growth is observed is recorded as a positive, and the numbers
for the three groups are combined to create a triplet such as 5-2-1, which means that five tubes receiving 10 ml of sample
showed bacterial growth, only two tubes in the 1-ml group showed growth,and only one of the 0.1-ml group was positive. A
microbiologist would use this combination-of-positives triplet as an index in the table like Table 1 to determine that the most
probable number of bacteria per 100 ml of the sample is 70, and 95% of the samples yielding this triplet between 30 and 210
bacteria per 100 ml. This information is stored in a file, mpmfile.txt, that has the same structure as Table 1.
(a) Define a type, MPNInfo, that represents each record in the file containing information on bacterial concentrations for
Most Probable Number. Each of these records is made of a string combination-of-positives as described above, an
integer representing the MPN Index/100 ml, the lower number of bacteria per 100 ml, and upper number of bacteria per
100 ml.[4]
(b) Define a function LoadMpnTable that uses a variable of type MPNInfo to load the MPN table from a stored file,
mpnfile.txt, into four parallel arrays:
an array of strings combOfPositives
three integer arrays - mpn, lower and upper
Your function must return the actual array size (number of records read from the file)
Table 1: Table of Bacterial Concentrations for Most Probable Number Method
95% Confidence Limits
Combination of
Positives MPN Index/100 ml Lower Upper
4-2-022956
4-2-1261265
4-3-0271267
4-3-1333377
4-4-0341680
5-0-023986
5-0-13010110
5-0-24020140
5-1-03010120
5-1-15020150
5-1-26030180
5-2-05020170
5-2-17030210
5-2-29040250
5-3-08030250
5-3-111040300
5-3-214060360
(c) Define a function Search that takes as arguments: the actual size of arrays, the arrays read in (b):
an array of strings combOfPositives
three integer arrays - mpn, lower and upper
and a combination-of-positives triplet and finds its index in the array combOfPositives, and produces the following:
if the target is found, this index is used to generate a message. For example, using information in Table 1, if the
triplet given is 5-2-1, the following message is produced:
For 5-2-1, MPN =70,95% of samples contain between
30 and 210 bacteria / ml
if the target is not found in the array, the following message is produced:
The combination 5-2-1 does not exist
(d) Provide a driver program to test the functions above.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions