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
REY [17]
3 years ago
14

In C++ the declaration of floating point variables starts with the type name float or double, followed by the name of the variab

le, and terminates with a semicolon. It is possible to declare multiple variables separated by commas in one statement. The following statements present examples,
float z;
double z, w;

The following partial grammar represents the specification for C++ style variable declaration. In this grammar, the letters z and w are terminals that represent two variable names. The non-terminal S is the start symbol.

S=TV;
V = cx
X= , V|E
T = float double
C = z|w

1. Determine Nullable values for the LHS and RHS of all rules. Please note, your answer includes all Nullable functions for LHS and RHS, in addition to the resulting values.
2. Using the Nullable values that you calculated in part 1, and using the FIRST sets that you calculated in part 2, determine the FOLLOW sets for all non-terminals, i.e. LHS of the rules. Please note, your answer includes all FOLLOW relations in addition to the resulting sets.
Engineering
1 answer:
Aliun [14]3 years ago
7 0

Answer:

The given grammar is :

S = T V ;

V = C X

X = , V | ε

T = float | double

C = z | w

1.

Nullable variables are the variables which generate ε ( epsilon ) after one or more steps.

From the given grammar,

Nullable variable is X as it generates ε ( epsilon ) in the production rule : X -> ε.

No other variables generate variable X or ε.

So, only variable X is nullable.

2.

First of nullable variable X is First (X ) = , and ε (epsilon).

L.H.S.

The first of other varibles are :

First (S) = {float, double }

First (T) = {float, double }

First (V) = {z, w}

First (C) = {z, w}

R.H.S.

First (T V ; ) = {float, double }

First ( C X ) = {z, w}

First (, V) = ,

First ( ε ) = ε

First (float) = float

First (double) = double

First (z) = z

First (w) = w

Explanation:

You might be interested in
I have a stream with three components, A, B, and C, coming from another process. The stream is 50 % A, and the balance is equal
tigry1 [53]

Answer:

X_{A} = \frac{N_{Ao}-N_{A}}{N_{Ao}}

Nₐ₀-Nₐ = 1.33

Nₐ₀ = 2.5

Conversion X = 1.33/2.5 = <u>0.533</u>

Explanation:

A + 2B + 4C ⇒ 2X + 3Y

Given a stream containing 50% A, 25% B and 25% C, to get the limiting reactant, lets take a simple basis

Say stream is 10 moles, this give

A = 5moles

B = 2.5mole

C = 2.5moles

from the balanced equation above,

1mole of A ⇒ 4moles of C

∴ 5moles of A ⇒ (5x4)/1 ⇒ 20moles of C

also;

2mole of B ⇒ 4moles of C

∴ 2.5moles of B ⇒ (2.5x4)/2 ⇒ 5moles of C

so clearly from above reactant C is the limiting reactant.

<em>Note: To get conversion of a process, we must use the limiting reactant. this is because ones it is used up, the reaction comes to an end</em>

<em></em>

Formula to obtain conversion is:

Conversion = (Amount of A used up)/(Amount of A fed into the system)

X_{A} = \frac{N_{Ao}-N_{A}}{N_{Ao}}

where, Nₐ₀-Nₐ = is the amount in moles of A used up

            Nₐ₀ = amount in moles of A fed into the system

The next question is what mole of reactant C will give 0.1mole fraction of Y

Recall our basis = 10moles

<em>from conservation of mass law</em>, 10mole of product must come out which 0.1 moles fraction is Y

therefore amount Y in the product is = 0.1x10 = 1mole

if  3moles of Y ⇒ 4mole of C

∴ 1mole of Y ⇒ (1x4)/3 ⇒ 1.33moles of C

calculating the conversion of limiting reactant C that will give 0.1mole fraction of Y

Nₐ₀-Nₐ = 1.33

Nₐ₀ = 2.5

Conversion X = 1.33/2.5 = <u>0.533</u>

5 0
2 years ago
The 30-kg gear is subjected to a force of P=(20t)N where t is in seconds. Determine the angular velocity of the gear at t=4s sta
tatyana61 [14]

Answer:

\omega =\frac{24}{1.14375}=20.983\frac{rad}{s}

Explanation:

Previous concepts

Angular momentum. If we consider a particle of mass m, with velocity v, moving under the influence of a force F. The angular  momentum about point O is defined as the “moment” of the particle’s linear momentum, L, about O. And the correct formula is:

H_o =r x mv=rxL

Applying Newton’s second law to the right hand side of the above equation, we have that r ×ma = r ×F =

MO, where MO is the moment of the force F about point O. The equation expressing the rate of change  of angular momentum is this one:

MO = H˙ O

Principle of Angular Impulse and Momentum

The equation MO = H˙ O gives us the instantaneous relation between the moment and the time rate of change of angular  momentum. Imagine now that the force considered acts on a particle between time t1 and time t2. The equation MO = H˙ O can then be integrated in time to obtain this:

\int_{t_1}^{t_2}M_O dt = \int_{t_1}^{t_2}H_O dt=H_0t2 -H_0t1

Solution to the problem

For this case we can use the principle of angular impulse and momentum that states "The mass moment of inertia of a gear about its mass center is I_o =mK^2_o =30kg(0.125m)^2 =0.46875 kgm^2".

If we analyze the staritning point we see that the initial velocity can be founded like this:

v_o =\omega r_{OIC}=\omega (0.15m)

And if we look the figure attached we can use the point A as a reference to calculate the angular impulse and momentum equation, like this:

H_Ai +\sum \int_{t_i}^{t_f} M_A dt =H_Af

0+\sum \int_{0}^{4} 20t (0.15m) dt =0.46875 \omega + 30kg[\omega(0.15m)](0.15m)

And if we integrate the left part and we simplify the right part we have

1.5(4^2)-1.5(0^2) = 0.46875\omega +0.675\omega=1.14375\omega

And if we solve for \omega we got:

\omega =\frac{24}{1.14375}=20.983\frac{rad}{s}

8 0
2 years ago
A small pad subjected to a shearing force is deformed at the top of the pad 0.08 in. The height of the pad is 1.38 in. What is t
Aleksandr-060686 [28]

Answer:

The shear strain is 0.05797 rad.

Explanation:

Shear strain is the ratio of change in dimension along the shearing load direction to the height of the plate under application of shear load. Width of the plate remains same. Length of the plate slides under shear load.

Step1

Given:

Height of the pad is 1.38 in.

Deformation at the top of the pad is 0.08 in.

Calculation:

Step2

Shear strain is calculated as follows:

tan\phi=\frac{\bigtriangleup l}{h}

tan\phi=\frac{0.08}{1.38}

tan\phi= 0.05797

For small angle of \phi, tan\phi can take as\phi.

\phi = 0.05797 rad.

Thus, the shear strain is 0.05797 rad.

7 0
2 years ago
Marcus wants to pursue a career in civil engineering. He aims to work for the city council as a civil engineer. What examination
Rzqust [24]

Answer:

Marcus would have to take an exam administered by the national council of examiners for engineering and surveying.

Explanation:

Civil engineers design, construct, and maintain projects regarding infrastructure. A civil engineer also looks after the systems in the public and private sectors like roads, buildings, and systems for water supply and sewage treatment.

In order to pursue a career in civil engineering, Marcus aims to work for the city council as a civil engineer. Therefore, he would have to take an exam administered by the national council of examiners for engineering and surveying.

6 0
2 years ago
There is evidence that liquid water existed on Mars at some time in the past. What is the evidence found indicating the presence
Norma-Jean [14]
There mag be water on Mars but it’s not very easy to spot, but that is besides the point,

Mars is a smaller planet then Earth, thus it has less gravity, meaning when water evaporates into the atmosphere of the planet the water slowly escapes into space, so there is less and less water on the planet.

Hope this helps!
5 0
3 years ago
Other questions:
  • What is the correct statement regarding the stress over the section of a shaft in torsion?
    13·1 answer
  • In the well-insulated trans-Alaska pipeline, the high viscosity of the oil and long distances cause significant pressure drops,
    12·1 answer
  • For the system in problem 4, suppose a main memory access requires 30ns, the page fault rate is .01%, it costs 12ms to access a
    14·1 answer
  • La Patrulla Fronteriza de los Estados Unidos analiza la compra de un helicóptero nuevo para la vigilancia aérea de la frontera d
    14·1 answer
  • Two routes connect an origin and a destination. Routes 1 and 2 have performance functions t1 = 2 + X1 and t2 = 1 + X2, where the
    6·1 answer
  • Researchers at the University of__________modified the iPhone to allow it to create medical images.
    9·2 answers
  • What do you think causes the differences in the properties of oxygen gas (O2) and ozone (O3)? the space between the atoms the ra
    9·1 answer
  • CNG is a readily available alternative to _________.
    9·1 answer
  • The distribution of ground shaking around the fault
    5·1 answer
  • What is voltage drop?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!