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
Answer:
See explaination
Explanation:
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE * file_object;
char file_name[100];
char ch;
int characters=0, words=0;
printf("Enter source file name: ");
scanf("%s", file_name); //asking user to enter the file name
file_object = fopen(file_name, "r"); //open file in read mode
if (file_object == NULL)
{
printf("\nUnable to open file.file not exist\n"); //check if the file is present or not
}
while ((ch = fgetc(file_object)) != EOF) //read each character till the end of the file
{
if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\0') //if character is space or tab or new line or null character increment word count
words++;
else
characters++; //else increment character count this assures that there is no spaces count
}
printf("The file story.txt has the following Statistics:\n"); //finally print the final statistics
if (characters > 0)
{
printf("Words: %d\n", words+1); //for last word purpose just increment the count of words
printf("Characters (no spaces): %d\n", characters);
}
fclose(file_object); //close the file object
return 0;
}
Firefox
any web browser can open a xps file
Answer:
Hey whats up
Explanation:
Count me in chief! I love when fellow user give out mighty points