Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. For parts (a) through (d), consider the following two algorithms that determine the number of lft2 tiles required to cover an empty floor: Algorithm

image text in transcribed

7. For parts (a) through (d), consider the following two algorithms that determine the number of lft2 tiles required to cover an empty floor: Algorithm 1 places tiles on the floor, one at a time, until the entire floor is covered by tiles Each time a tile is placed on the floor, a counter is updated. The final value of the counter is the number of tiles required to cover the floor Algorithm 2 places tiles across the floor along two adjacent walls. A calculation is then made to compute the area by multiplying the number of tiles placed across the floor along one wall by the number of tiles placed across the floor along the adjacent wall. The result of this calculation is the number of tiles required to cover the floor For parts (a) and (b), suppose that it takes Is to lay a single tile on the floor and 60s to perform a complex calculation e.g. multiplication. (a) How long (in hours) would Algorithm 1 take to determine the number of tiles required to cover an empty floor that is 108ft wide by 40ft long? (b) How long (in hours) would Algorithm 2 take to determine the number of tiles required to cover an empty floor that is 108ft wide by 40ft long? (c) Which algorithm is faster on the 108ft wide by 40ft long floor? How many times faster is it? Calculate your answer to a maximum of two decimal places (d) Represent Algorithm 1 using a flowchart

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions