Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve this problem as much as possible please I really need your help iPad? 12:03 AM 94% Document5.docx Share O The puzzle Paula has

Please solve this problem as much as possible please I really need your helpimage text in transcribed

iPad? 12:03 AM 94% Document5.docx Share O The puzzle Paula has always been a huge fan of roller coasters, so she visits amusement parks every chance she gets. Her latest trip took her to Crazyland, which boasts five roller coasters, each of which is different type of coaster (flying, fourth dimension, pipeline, stand up, or suspended). Although each roller coaster contains a different number of inversions (8 through 12), what really makes each ride exciting is a different thl element (bow tie, cobra roll, inside raven turn, outside top hat, or zero-G roll). With more roller coasters scheduled to open next year, Paula would say that Crazyland is on the fast track From the information provided, determine the number of inversions in the roller coaster of each type, as well as the thrill element in each ride. 1. The coaster with a thrilling outside top hat has exactly 1 more inversion than the flying coaster 2. The flying coaster has more inversions than at least one other ride. 3. The roller coaster with the most inversions doesn't have a cobra roll. 4. The roller coaster with the most inversions isn't the Stinger 5. The suspended coaster has exactly 1 more inversion than the Screaminator 6. The Screaminator doesn't have 11 inversion. 7. Neither the pipeline coaster nor the one with a zero-G roll has 8 inversions.1 8. The Plunger has exactly 1 more inversion than the fourth-dimension coaster. 9. Whistle Stop has exactly 1 inversion more than the ride with a stunning bow-tie maneuver 10. Whistle Stop has exactly 1 inversion less than the stand-up roller coaster. 11. The stand-up roller coaster isn't Flapdoodle. Now let's define a data structure to hold the information about the roller coaster. There are many ways to do this. The following is only one of the many possibilities: /coaster(inversions,name,type,element). */ Note that you only have to keep this structure in mind. You do not have to actually enter it into your Prolog program. That is why we put it here as a comment (Prolog comments are enclosed in "and "*/", you can also use the single line comments which start with triple percentage sign "%%%" and extend until the end of the line). Next we define a coasterList that contains the five coasters (note that the underscore character "*by itself is used to represent the "don't care" or "don't know" values in Prolog) coasterList(coaster8,) coaster(9,) coaster(10) coaster 11) coaster(1)]) Now we can encode the hints into the solution (Rule 1 is encoded below for you): solution(S): coasterList(S), member(coaster(Top. outside-top-hat), s), member(coaster(Fly,_flying_), S), TopFly1, 1 of 2 iPad? 12:03 AM 94% Document5.docx Share O The puzzle Paula has always been a huge fan of roller coasters, so she visits amusement parks every chance she gets. Her latest trip took her to Crazyland, which boasts five roller coasters, each of which is different type of coaster (flying, fourth dimension, pipeline, stand up, or suspended). Although each roller coaster contains a different number of inversions (8 through 12), what really makes each ride exciting is a different thl element (bow tie, cobra roll, inside raven turn, outside top hat, or zero-G roll). With more roller coasters scheduled to open next year, Paula would say that Crazyland is on the fast track From the information provided, determine the number of inversions in the roller coaster of each type, as well as the thrill element in each ride. 1. The coaster with a thrilling outside top hat has exactly 1 more inversion than the flying coaster 2. The flying coaster has more inversions than at least one other ride. 3. The roller coaster with the most inversions doesn't have a cobra roll. 4. The roller coaster with the most inversions isn't the Stinger 5. The suspended coaster has exactly 1 more inversion than the Screaminator 6. The Screaminator doesn't have 11 inversion. 7. Neither the pipeline coaster nor the one with a zero-G roll has 8 inversions.1 8. The Plunger has exactly 1 more inversion than the fourth-dimension coaster. 9. Whistle Stop has exactly 1 inversion more than the ride with a stunning bow-tie maneuver 10. Whistle Stop has exactly 1 inversion less than the stand-up roller coaster. 11. The stand-up roller coaster isn't Flapdoodle. Now let's define a data structure to hold the information about the roller coaster. There are many ways to do this. The following is only one of the many possibilities: /coaster(inversions,name,type,element). */ Note that you only have to keep this structure in mind. You do not have to actually enter it into your Prolog program. That is why we put it here as a comment (Prolog comments are enclosed in "and "*/", you can also use the single line comments which start with triple percentage sign "%%%" and extend until the end of the line). Next we define a coasterList that contains the five coasters (note that the underscore character "*by itself is used to represent the "don't care" or "don't know" values in Prolog) coasterList(coaster8,) coaster(9,) coaster(10) coaster 11) coaster(1)]) Now we can encode the hints into the solution (Rule 1 is encoded below for you): solution(S): coasterList(S), member(coaster(Top. outside-top-hat), s), member(coaster(Fly,_flying_), S), TopFly1, 1 of 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

Explain methods of metal extraction with examples.

Answered: 1 week ago

Question

2. What should an employer do when facing an OSHA inspection?

Answered: 1 week ago