Let B = {x | x ? {a, b, c}* and x contains the same number of at
least two of the three
symbols}. Show that B is a CFL by giving either a stack machine or
a CFG for it.
The CFG for given language is as follows:
{{S,X,Y,Z,A,B,C},{a,b,c},P,S} with production rulw
S-> X|Y|Z
X-> XaXbX| XbXaX | C
Y-> YbYcY| YcYbY | A
Z-> ZaZcZ| ZcZaZ | B
A-> aA | 
B-> bB | 
C-> cC | 
Here X will generate all strings have equal no. of 'a's and 'b's.
Here Y will generate all strings have equal no. of 'b's and 'c's.
Here Z will generate all strings have equal no. of 'a's and 'c's.
A generate strings of a.
B generate strings of b.
C generate strings of c.
Show an Finite State Machine (deterministic or nondeterministic) that accepts L={ω∈a,b,c*: ω contains at least one substring that consists of three identical symbols in a row}. For example: The following strings are in L:aabbb, baacccbbb. The following strings are not in L: ε, aba, abababab, abcbcab.
Let G be a group of order 6 and let X be the set (a, b,c) E G3: abc That is, X is the set of triples of elements of G with the product of its coordinates equals the identity element of G (a) How many elements does X have? Hint: Every triple (a, b, c) in X is completely determined by the choice of a and b. Because once you choose a and b then c must be (ab)-1...
A bag contains 4 red and 5 green balls. Let X denotes number
of red and Y denotes number of green balls in 2 drawn from the bag
by random. Find joint probability distribution, compute E(x), E(Y)
and correlation coefficient. 2. A diagnostic test has a probability
0.95 of giving a positive result when applied to a person suffering
from a certain disease, and a probability0.10 of giving a (false)
positive when applied to a non-sufferer. It is estimated that...
Let G be the CFG: S → aS | Sb | a | b. Show that no string in L(G) contains ba as substring.
Let L be {x ∈ {a, b, c} : x has an even number of a’s, an even number of b’s, and an even number of c’s}. a) Show that L is regular. b) How many states are there in a minimal deterministic finite automaton recognizing L? Justify your answer.
Let A.B and C be three disjoint events defined over the same place S. Assume AUBU C = S, P(A) = 0.4, and P(B) = 0.4. 1) Compute P(C) [The answer should be a number rounded to five decimal places, don't use symbols such as % 2) Compute the P(AUB) [The answer should be a number rounded to five decimal places, don't use symbols such as %
1. A bag contains 4 red and 5 green balls. Let X denotes number of red and Y denotes number of green balls in 2 drawn from the bag by random. Find joint probability distribution, compute E(x), E(Y) and correlation coefficient. 2. A diagnostic test has a probability 0.95 of giving a positive result when applied to a person suffering from a certain disease, and a probability0.10 of giving a (false) positive when applied to a non-sufferer. It is estimated...
Q–2: [5+2+3 Marks] Let X be a random variable giving the number of heads minus the number of tails in three tosses of a coin. a) Find the probability distribution function of the random variable X. b) Find P(−1 ≤ X ≤ 3). c) Find E(X).
a be a real number . If a--a, prove that either a 0 or a 1. 8. (Pigeonhole Principle) Suppose we place m pigeons in n pigeonholes, where m and n are positive integers. If m > n, show that at least two pigeons must be placed in the same pigeonhole. [Hint (from Robert Lindahl of Morehead State University): For i 1, 2, . . . , n, let Xi denote the number of pigeons that are placed in the...
Problem 5. (20 pts) Let n E N be a natural number and let X C N be a subset with n +1 elements. Show that there exist two natural numbers x,y X such that x-y is divisible by n