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
pashok25 [27]
3 years ago
15

Write the following statements as Prolog clauses, in the order given: If it is raining or snowing, then there is precipitation.

If it is freezing and there is precipitation, then it is snowing. If it is not freezing and there is precipitation, then it is raining. It is snowing. What answer does Prolog give to the following queries: Is it freezing
Engineering
1 answer:
Anika [276]3 years ago
8 0

Answer:

a. See Explanation Below

b. No

Explanation:

a.

Interpreting the statements line by line.

First, the prolog clauses need to be initialised, as follows:

:- dynamic freezing/0, precipitation/0, snowing/0, raining/0.

If it is raining or snowing, then there is precipitation.

The statement is splited in two.

1st, if it is raining then there is precipitation

Or

2nd, if it is raining, then there is precipitation.

So, both statements are given as:

precipitation :- raining.

precipitation :- snowing.

If it is freezing and there is precipitation, then it is snowing.

This is a conditional statement that checks if it is freezing AND there's is precipitation.

If true, then it is snowing.

The above statement is given as:

snowing :- freezing, precipitation.

If it is not freezing and there is precipitation, then it is raining.

This is a conditional statement that checks if it is not freezing AND there's is precipitation.

If true, then it is raining.

The not clause is represented as \+

The above statement is the given as:

raining :- \+ freezing, precipitation.

It is snowing.

This is represented as follows

snowing.

So, the full prolog clause is as follows

:- dynamic freezing/0, precipitation/0, snowing/0, raining/0.

precipitation :- raining.

precipitation :- snowing.

snowing :- freezing, precipitation.

raining :- \+ freezing, precipitation.

snowing.

b. What answer does Prolog give to the following queries:

Is it freezing

No

Reason;

All of the conditions above point to raining or snowing; none points to freezing.

Hence, it is no.

You might be interested in
A 65% efficient turbine receives 2 m^3/s of water from a reservoir. The reservoir water surface is 45 m above the centerline of
laiz [17]

Answer:

P_{out} = 508.071 kW

Given:

efficiency of the turbine, \eta = 65% = 0.65

available gross head,  H_{G} = 45 m

head loss,  H_{loss} = 5 m

Discharge, Q =  2 m^{3}

Solution:

The nozzle is 100% (say)

Available power at the inlet of the turbine,  P_{inlet} is given by:

P_{inlet} = \rho Qg(H_{G} - H_{loss})                  (1)

where

\rho = density of water = 997 kg/m^{3}

acceleration due to gravity, g = 9.8 m^{2}

Using eqn (1):

P_{inlet} = 997\times 2\times 9.8(45 - 5) = 781.65 kW

Also, efficency, \eta is given by:

\eta = \frac{P_{out}}{P_{inlet}}

0.65 = \frac{P_{out}}{781.648\times 1000}

P_{out} = 0.65\times 781.648\times 1000 = 508071 W = 508.071 kW

P_{out} = 508.071 kW

3 0
3 years ago
Drivers education - Unit 3
melamori03 [73]

The following scenarios are pertinent to driving conditions that one may encounter. See the following rules of driving.

<h3>What do you do when the car is forced into the guardrail?</h3>

Best response:

  • I'll keep my hands on the wheel and slow down gradually.
  • The reason I keep my hands on the steering wheel is to avoid losing control.
  • This will allow me to slowly back away from the guard rail.
  • The next phase is to gradually return to the fast lane.
  • Slamming on the brakes at this moment would result in a collision with the car behind.

Scenario 2: When driving on a wet road and the car begins to slide

Best response:

  • It is not advised to accelerate.
  • Pumping the brakes is not recommended.
  • Even lightly depressing and holding down the brake pedal is not recommended.
  • The best thing to do is take one foot off the gas pedal.
  • There should be no severe twists at this time.

Scenario 3: When you are in slow traffic and you hear the siren of an ambulance behind

Best response:

  • The best thing to do at this moment is to go to the right side of the lane and come to a complete stop.
  • This helps to keep the patient in the ambulance alive.
  • It also provide a clear path for the ambulance.
  • Moving to the left is NOT recommended.
  • This will exacerbate the situation. If there is no place to park on the right shoulder of the road, it is preferable to stay in the lane.

Learn more about rules of driving. at;

brainly.com/question/8384066

#SPJ1

4 0
2 years ago
Time complexity of merge sort
vovangra [49]

Answer:

The correct answer is "O (n\times Log n)". A further explanation is given below.

Explanation:

  • Throughout all the three instances (worst, average as well as best), the time complexity including its Merge sort seems to be O (n\times Log n) as the merge form often splits the array into two halves together tends to linear time to combine multiple halves.
  • As an unsorted array, it needs an equivalent amount of unnecessary capacity. Therefore, large unsorted arrays are not appropriate for having to search.
6 0
4 years ago
Using the Tsai-Hill failure criterion, determine the strength of a lamina under equal biaxial tension and shear at 45o to the fi
Alinara [238K]

Answer:

Explanation:

solution to the question

5 0
3 years ago
John wants to construct a device using quartz crystal, Which device can he construct?
tatiyna

Answer: Option D, piezoelectric pressure guage

Explanation: Quartz crystal possess a very useful quality in science as they can generate small charges when pressure is applied to them or when they are hit. This property can be harnessed to construct a piezoelectric pressure gauge which would be used to measure and indicate changes in pressure, the quartz crystal releases little voltage each time there is an applied pressure . This device would be able to sense changes in pressure as there would voltage proportional to the applied pressure.

4 0
3 years ago
Read 2 more answers
Other questions:
  • A sample of wastewater is diluted 10 times. The diluted solution has an ultimate biochemical oxygen demand (BOD), Lo, of 30 mg/L
    9·1 answer
  • Implement Heap (constructors, trickleUp and trickleDown), MyPriorityQueue (constructor, offer, poll, peek and isEmpty) and HeapS
    12·1 answer
  • A car engine operates with a thermal efficiency of 20%. Assume the air-conditioner has a coefficient of performance of β = 2 wor
    5·1 answer
  • What does product integration refer to in an advanced manufacturing setting?
    9·2 answers
  • Info security:
    8·1 answer
  • Consider three charged sheets, A, B, and C. The sheets are parallel with A above B above C. On each sheet there is surface charg
    7·1 answer
  • Which atom bond in atomic interaction combines electrons, filling its valence zone a) Van der Vaals bond; b) a covalent bond; c)
    8·1 answer
  • A 60-Hz 3-phase induction motor is required to drive a load at approximately 850 rpm. How many poles should the motor have
    9·1 answer
  • Where has the process of nuclear fusion been occurring for over four billion years
    6·1 answer
  • A(n) _____________ is used commonly in open split-phase motors to disconnect the start winding from the electrical circuit when
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!