There are two types of tables X and Y, let assume the X is the shorter one and Y is 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] o0 .... X- 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. -/ Final-THE 2 of 3 2020-2021/Second 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 OUuild script). 3- Provide 2 screenshots, one for the two examples input and output and one for any other input and output

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Can i get answer for this useing oubuild only please,?

There are two types of tables X and Y, let assume the X is the shorter one and Y is 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]
00
....
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.
/ Final-THE
2 of 3
2020-2021/Second
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
OUuild script).
3- Provide 2 screenshots, one for the two examples input and output and one for any other input and
output
Transcribed Image Text:There are two types of tables X and Y, let assume the X is the shorter one and Y is 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] 00 .... 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. / Final-THE 2 of 3 2020-2021/Second 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 OUuild script). 3- Provide 2 screenshots, one for the two examples input and output and one for any other input and output
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY