Draw a flowchart for a computer program to receive 40 numbers
and output “yes” if number...
Draw a flowchart for a computer program to receive 40 numbers
and output “yes” if number of negative values among the first 10
inputs is equal to number of positive values among the last 10
inputs. Note. The 20 numbers in middle are ignored. For instance,
if the values are:
1,-1,1,1,-1,1,-2,5,1,1,4,4,5,-6,5,8,-12,0,2,0,1,2,3,7,7,-7,0,1,1,1,3,4,1,-1,-1,-1,-1,-1,-1,-1
the program should output “yes” since the number of negative values
in the first 10 numbers is 3, and the number of positive values in
the last 10 numbers...
1. Within a computer program, the number of bugs (i.e., coding
errors) per lines of code...
1. Within a computer program, the number of bugs (i.e., coding
errors) per lines of code has a Poisson distribution with an
average of fifteen bugs per 1,000 lines.
a. Find the probability that there will be exactly eight bugs in
1,000 lines of code.
b. Find the probability that there will be at least eight bugs
in 1,000 lines of code.
c. Find the probability that there will be at least one bug in
1,000 lines of code.
d....
1) Suppose an algorithm has 6 types of input given by S = {I_1,
I_2, ...,...
1) Suppose an algorithm has 6 types of input given by S = {I_1,
I_2, ..., I_6}. Suppose the inputs occur with the following
probabilities: P(I_2) = P(I_3) = P(I_4) = 1/12, P(I_5)
= P(I_6) = 1/6, and P(I_1) = 5/12.
Suppose further that each input "I_n" (n = 1,2,3,4,5,6) causes
the algorithm to execute "5n" instructions. What is the expected
number of instructions executed by the algorithm?
2) When three fair dice are tossed, what is the probability that...
A commuter crosses one of three bridges, A, B, or C, to go home
from work....
A commuter crosses one of three bridges, A, B, or C, to go home
from work. The commuter crosses A with probability 1/3, B with
probability 1/6, and C with probability 1/2. The commuter arrives
home by 6 p.m. 75%, 60%, and 50% of the time by crossing bridges A,
B, and C, respectively. If the commuter arrives home by 6 p.m.,
find the probability that bridge A was used. Also find the
probabilities for bridges B and C.
A computer system uses passwords that contain exactly 5
characters, and each character is 1 of...
A computer system uses passwords that contain exactly 5
characters, and each character is 1 of the 3 lowercase letters (a,
b, c) or 3 upper case letters (A, B, C) or the 5 odd digits (1, 3,
5, 7, 9).. Let Ω denote the set of all possible passwords, and let
A and B denote the events that consist of passwords with only
letters or only integers, respectively. Determine the number of
passwords for A′∩ B′. Report the exact...
For each of the following Python programs P and input strings I,
give the output P(I),...
For each of the following Python programs P and input strings I,
give the output P(I), using the formal definition of P(I) given,
and employing any reasonable reference computer C:
Definition of P(I), the output of a Python program. Let P be a
Python program with respect to a reference computer system C.
Suppose P has main function M, and let I be a string of ASCII
characters that will be used as input to P. The output of P...