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.
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 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
3-17. Let X denote the number of bars of service on your cell phone whenever you are at an intersection with the follow- ing probabilities: 4 P(X x) 0.1 0.15 0.25 0.25 0.15 0.1 Determine the following probabilities: (a) Two or three bars (b) Fewer than two bars (c) More than three bars (d) At least one bar
a = 1
b = 2
c= 3
Let a, b and c be the three integers previously assigned to you. Let q be the three-digit number abc. The shape, y(x), of a certain structure is governed by the following differential equation. 1 dy dx? x dx Suppose that y(0.5)=0.71459 y(3)=4 + 1. Use the shooting method and MATLAB's built-in numerical solver ODE45 to compute y(x) on the interval 0.55x53. (The value of y at x = 3 must be...