1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Juliette [100K]
2 years ago
11

A detective agency is looking to bust an arms sale. According to available intelligence, the sale is likely to happen in one of

the three locations A, B, or C. Historical patterns indicate that P(A) (the likelihood that the sale will happen at A) is twice that of P(B), and likewise, P(B) = 2P(C). What is the probability distribution of the arms sale happening in these 3 places? Let us denote the location of the sale with a memoryless source X, i.e., X takes values ‘A’, ’B’, ’C’, with probabilities P(A), P(B), and P(C) respectively. Calculate it’s entropy H(X) in bits. Note that H(X) represents the amount of uncertainty in the location of the sale. The director of the agency is not very happy with the level of uncertainty. So he looks up recent covert transmissions for hints. He finds a recent coded message from agent Atomic Blonde which indicates that the sale will not happen at C. Let us denote the message from agent Blonde as Y , and in this case Y ="not C". Given this information, what is the new uncertainty H(X|Y = "not C")?
Computers and Technology
1 answer:
Paha777 [63]2 years ago
4 0

Answer:

Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}

H(X)=5.4224 bits per symb

H(X|Y="not C")=0.54902 bits per symb

Explanation:

P(B)=2P(C)

P(A)=2P(B)

But

P(A)+P(B)+P(C)=1

4P(C)+2P(C)+P(C)=1

P(C)=1/7

Then

P(A)=4/7

P(B)=2/7

Probability Distribution={(A, 4/7), (B, 2/7), (C, 1/7)}

iii

If X={A,B,C}

and P(Xi)={4/7,2/7,1/7}

where  Id =logarithm to base  2

Entropy, H(X)=-{P(A) Id P(A) +P(B) Id P(B) + P(C) Id P(C)}

=-{(1/7)Id1/7 +(2/7)Id(2/7) +(4/7)Id(4/7)}

=5.4224 bits  per symb

if P(C)  =0

P(A)=2P(B)

P(B)=1/3

P(A)=2/3

H(X|Y="not C")= -(1/3)Id(I/3) -(2/3)Id(2/3)

=0.54902 bits per symb

You might be interested in
When computers connect to one another to share information, but are not dependent on each other to work, they are connected thro
Andrej [43]
Peer-to-peer would be my best bet. Hope this helps. 
3 0
3 years ago
Read 2 more answers
What is a computer dedicated to a single function, such as a calculator or computer game? A. TabletB. PDAC.ApplianceD. Minicompu
viktelen [127]

Answer:

C. Appliance.

Explanation:

When a device or machine performs a single function or task, it is commonly referred to as an appliance. Examples of such is an iron, a calculator, a computer game, washing machines, refrigerators, e.t.c

<em>A Personal Digital Assistant (PDA)</em>, is a device, mostly mobile and handheld, that combines various computing features such as telephoning and networking. An example is a tablet. A PDA performs more than a single function.

<em>Minicomputer</em> is a computer usually small in physical size, that is midway in capabilities and support, between a microcomputer and a mainframe computer. An example is also a tablet and our smartphones. Minicomputers are also dedicated to various functions rather than a single function.

In summary, the option that best describes the situation in the question is an appliance.

<em>Hope this helps!</em>

6 0
3 years ago
Write a new program called Lab7D that will read strings from a text file and turn them into "encrypted code". Create a bool func
Aliun [14]

Answer:

I am writing a C program for the first part and Python program for the second part of the question.    

<h2>1st program:</h2>

#include <stdio.h>  //to use input output functions

#include <stdlib.h>  // used here to access exit function

void main() {  //start of the main() function body

char fname[100], character;

// fname is the name of the input file which contains characters and character //variable is used to store characters

FILE *original, *temporary;  

/* two pointers of File type: original is used for the original input file and temporary is used for a temporary file name aux.txt */

printf("Enter the name of the text file to encrypt : ");

//prompts the user to enter the name of the file to be encrypted

scanf("%s",fname); //reads the name of the file from user

original=fopen(fname, "r"); //open the input file in read mode

if(original==NULL)  {

//displays the following message if the file is empty or does not exists

 printf("Cannot open original file");  

 exit(1);  }  //program exits

temporary=fopen("aux.txt", "w");

//creates a temporary file named aux.txt and open that file in write mode

if(temporary==NULL)  { //if temporary file could not be created

 printf("Cannot create a temporary file");

 fclose(original); //closes the original input file

 exit(2);  }  //program exits

while(1)  {

 character=fgetc(original);  

/*pointer original moves through the input file and gets input from original input file one character at a time and store it in character variable */

 if(character==EOF)  

//when all characters are obtained and pointer is at end of file  {

  break;  //the loop breaks }

 else   {  //if EOF is not yet reached

  character=character+100;  

//add 100 to each character to encrypt the characters

  fputc(character, temporary);

 // fputc() writes a single character at a time to aux file } }

fclose(original);  //closes input file

fclose(temporary); //closes aux file

original=fopen(fname, "w");  //opens input file in write mode

if(original==NULL) { //if file does not exist display following message

 printf("Cannot open the original file to write");

 exit(3);  } //program exits

temporary=fopen("aux.txt", "r"); //open aux.txt file in read mode

if(temporary==NULL)  { //if pointer temporary is NULL

 printf(" Cannot open temporary file to read");

 fclose(original);  //closes input file

 exit(4);  } //program exits

while(1)  {

 character=fgetc(temporary);

//obtains every character from aux file pointed by temporary

 if(character==EOF)  //if end of file is reaced {

  break;   } //the loop breaks

 else   { //if end of file is not reached

  fputc(character, original);  

//puts every character to input file }  }

printf(" %s is encrypted \n", fname);  

//displays this message when input file is successfully encrypted

//closes input and aux text files

fclose(original);

fclose(temporary); }  

Explanation:

The program first asks the user to enter the name of the file. Then the program uses two pointers original for input file and temporary for aux text file. It first opens the file whose name is entered by the user and reads that file by getting each single character using fgetc() until the pointer reaches the end of the file. While reading each character of the input file, it encrypts every character using and puts that encrypted content in temporary file names aux.txt using fputc() until the pointer reaches the end of the file. Lastly all the encrypted strings of the are placed in the original input text file.

<h2>Second program:</h2>

# bool function that accepts character as parameter and returns true if its a #vowel and false otherwise

def isVowel(character):  

   if character.lower() in 'aeiou':  #converts uppercase char to lowercase

       return True  #return true if character is a vowel    

   else:

       return False #returns false if input character is not a vowel

The program has a function isVowel() which takes a character as a parameter to check if that character is a vowel. If character is in uppercase  letters, it handles these characters using lower() method to convert the character to lowercase and then returns true if that character is a vowel otherwise returns false. To check the working of the function you can replace True and False with print statement such as:

if character.lower() in 'aeiou':

       print("It is a vowel")

   else:

       print("It is not a vowel")

And after that you can call this function and pass a character to it as:

isVowel('i')

5 0
3 years ago
Read the following scenario what type of business letter do you think is required in this situation?
grandymaker [24]

Answer:

Cover letter

Explanation:

The type of business letter Melissa and Melrose would need to write is a Cover letter.

The Cover Letter is usually not more than a page document which gives a kind of summary or hint about who individual is and the quality of the individual, while highlighting why an individual is the best fit for the role they are seeking for.

Most recruiters usually make use of the cover letter, as a first hurdle, to screen out applicants especially when applications are much.

Melissa and Melrose, in addition to the resume they would submit for the volunteering job, would need a cover letter.

8 0
3 years ago
Read 2 more answers
Good day Statistical Methods tutor , I would like to know the formula for calculating the percentage of stockouts for the given
sveticcg [70]

In order to derive the probability of stock outs, divide the total value of the stock outs by the number of requests demanded. The resulting figure must then be multiplied by 100.

<h3>What is a stock out?</h3>

In business, a stock out refers to a condition where in a certain item or items are no longer available in stock.

The formula can be sated simply as:

Probability of Stock outs = (No of stock outs/ number of demand requests) x 100

Thus Number of Stock outs = Total probability of stock outs * total number of demand requests.

<h3>What is the formula for the Total Cost?</h3>

The formula for Total Cost is given as:

Total Fixed Cost + Total Variable Cost;

TC = TFC + TVC

Learn more about stock outs at:
brainly.com/question/16209393
#SPJ1

5 0
2 years ago
Other questions:
  • One of the most toxic components of a computer is the
    11·1 answer
  • which one of the following word process feature saves you the most time when you keying in a document
    9·1 answer
  • What is the output after running the following code snippet? int number = 600; if (number &lt; 200) { System.out.println("Low sp
    15·1 answer
  • In vehicles equipped with ABS, the driver's foot must remain firmly on the _________ to activate the ABS.
    7·2 answers
  • [This is on Edhesive (coding and programming)]
    8·2 answers
  • Rhea has been asked to interview the new CEO of an energy company. She has scheduled a meeting with him in the company’s meeting
    9·2 answers
  • I can't solve this <br> Python loop with while statement
    15·2 answers
  • Use the drop-down menus to answer the questions.
    6·1 answer
  • Where do you interact with databases on a daily basis?
    10·2 answers
  • Vector images take up much less space when saved to a computer or storage device because computers and storage devices just need
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!