Introductory Circuit Analysis (13th Edition)
Introductory Circuit Analysis (13th Edition)
13th Edition
ISBN: 9780133923605
Author: Robert L. Boylestad
Publisher: PEARSON
Bartleby Related Questions Icon

Related questions

Question
i need the answer quickly
There are two types of tables X and Y, let assume the X is the shorter one and Yis more longer. the
combination must be occurred between the two types of tables to be aligned and filling up the given
distance. We can use a few number of tables to cover all the required distance as possible. Hence, you are
required to find the optimum combination to keep the remaining empty distance is as small as possible.
[Hint: the first priority is to minimize the empty distance, and the second priority is to minimize the number
of used tables]
....
Examples:
Input: X= 3, Y = 5, D= 24
The optimum combination is: TX = 3, TY = 3, RD = 0
It means: three tables of size X (TX), three tables of size Y (TY), and remaining distance
(RD) is 0.
3* 3+3*5= 24
So empty distance = 24 - 24 = 0
Input: X = 3, Y = 9, D = 29
Output: TX =0, TY = 3, RD = 2
It means: zero tables of size X (TX), three tables of size Y (TY), and remaining distance (RD) is 2.
0*3+3*9 = 27
So empty distance = 29 - 27 = 2
1- Design an algorithm to solve this problem by using loop and if statement with providing full
comments on the code. According the complexity which is covered in the TM111 chapter 6 you
should make your algorithm efficient.
2- Implement the algorithm using OUBuild script following the above steps (with screenshot of the
OUBuild script).
3- Provide 2 screenshots, one for the two examples input and output and one for any other input and
output
expand button
Transcribed Image Text:There are two types of tables X and Y, let assume the X is the shorter one and Yis more longer. the combination must be occurred between the two types of tables to be aligned and filling up the given distance. We can use a few number of tables to cover all the required distance as possible. Hence, you are required to find the optimum combination to keep the remaining empty distance is as small as possible. [Hint: the first priority is to minimize the empty distance, and the second priority is to minimize the number of used tables] .... Examples: Input: X= 3, Y = 5, D= 24 The optimum combination is: TX = 3, TY = 3, RD = 0 It means: three tables of size X (TX), three tables of size Y (TY), and remaining distance (RD) is 0. 3* 3+3*5= 24 So empty distance = 24 - 24 = 0 Input: X = 3, Y = 9, D = 29 Output: TX =0, TY = 3, RD = 2 It means: zero tables of size X (TX), three tables of size Y (TY), and remaining distance (RD) is 2. 0*3+3*9 = 27 So empty distance = 29 - 27 = 2 1- Design an algorithm to solve this problem by using loop and if statement with providing full comments on the code. According the complexity which is covered in the TM111 chapter 6 you should make your algorithm efficient. 2- Implement the algorithm using OUBuild script following the above steps (with screenshot of the OUBuild script). 3- Provide 2 screenshots, one for the two examples input and output and one for any other input and output
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Electrical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, electrical-engineering and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Introductory Circuit Analysis (13th Edition)
Electrical Engineering
ISBN:9780133923605
Author:Robert L. Boylestad
Publisher:PEARSON
Text book image
Delmar's Standard Textbook Of Electricity
Electrical Engineering
ISBN:9781337900348
Author:Stephen L. Herman
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Electrical Engineering
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Text book image
Fundamentals of Electric Circuits
Electrical Engineering
ISBN:9780078028229
Author:Charles K Alexander, Matthew Sadiku
Publisher:McGraw-Hill Education
Text book image
Electric Circuits. (11th Edition)
Electrical Engineering
ISBN:9780134746968
Author:James W. Nilsson, Susan Riedel
Publisher:PEARSON
Text book image
Engineering Electromagnetics
Electrical Engineering
ISBN:9780078028151
Author:Hayt, William H. (william Hart), Jr, BUCK, John A.
Publisher:Mcgraw-hill Education,