Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Code 39 is a common bar code system that consists of narrow and wide bars (black

ID: 3070547 • Letter: C

Question

Code 39 is a common bar code system that consists of narrow and wide bars (black) separated by either wide or narrow spaces (white). Each character contains nine elements (five bars and four spaces). The code for a character starts and ends with a bar (either narrow or wide) and a (white) space appears between each bar. The original specification (since revised) used exactly two wide bars and one wide space in each character. For example, if b and B denote narrow and wide (black) bars, respectively, and w and W denote narrow and wide (white) spaces, a valid character is bwBwBWbwb (the number 6).

Suppose that all 40 codes are equally likely (none is held back as a delimiter). Determine the probability for each of the following.


Enter your answers as proper fractions.


(a) The second bar is wide given that the first bar is wide.


(b) The third bar is wide given that the first two bars are not wide.


(c) The first bar is wide given that the last bar is wide.

Explanation / Answer

a)

A = permutations with first bar wide,

B = permutations with second bar wide P(B|A) = () / ()

There are 5 bars and 2 are wide.

Number of permutations of the bars with 2 wide and 3 narrow bars is 5!/(2!3!) = 10

Number of permutations of the 4 spaces is 4!/(1!3!) = 4

Number of permutations of the bars with the first bar wide is 4!/(3!1!) = 4.

Spaces are calculated above

Therefore, P(A) = 4*4 / 40= 16/40 = 0.4

Number of permutations of the bars with the first and second bar wide is 1(i.e BBbbb)

Spaces are calculated above earlier

. Therefore, P(A B) = 1*4/40=4/40 = 0.1

Therefore, P(B|A) = 0.1/0.4 = 0.25

P(second bar is wide given that the first bar is wide.) = 0.25

................................................

b)

A = first two bars not wide,

B = third bar wide

P(B|A) = () / ()

Number of permutations of the bars with the first two bars not wide is 3! / (2!1!) = 3.

Number of permutations of the 4 spaces = 4

Therefore, P(A) = 4*3/40=12/40 =0.3

Number of permutations of the bars with the first two bars not wide and the third bar wide is 2(i.e bbBBb, bbBbB)

Number of permutations of the 4 spaces is 4!/(1!3!) = 4

Therefore, P(A B) = 8/40

P(B|A) = 0.2/0.3 = 2/3

P(The third bar is wide given that the first two bars are not wide)=2/3

.........................................................................

(c)

A = first bar wide,

B = last bar wide

P(A|B) = () ()

Number of permutations of the bars with last bar wide is 4!/(3!1!) = 4

Number of permutations of the 4 spaces is 4!/(1!3!) = 4

Therefore, P(B) = 16/40 = 0.4

Number of permutations of the bar with the first and last bar wide is 1. (i.e BbbbB)

Number of permutations of the 4 spaces is 4!/(1!3!) = 4

Therefore, P(A B) = 4/40 = 0.1

P(A|B) = 0.1/0.4 = 0.25

P(The first bar is wide given that the last bar is wide)=0.25

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote