Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Samuel owns a shoe factory where there are N different machines operated for N different purposes. Each machine has its own motor. In order to

Samuel owns a shoe factory where there are N different machines operated for N different purposes. Each machine has its own motor. In order to avoid resonance, the rotation speed of any 2 machines should at least differ by 2 units. The rotation speed can only be in integer units and the maximum rotation speed of any motor is X units. Given minimum rotation speed of any motor to be 1 unit, you have to help Sam find out the number of different ways he can configure the speed of the motor. Input Specification: input1: N, denoting the number of machines. input 2X, denoting the maximum speed of the motor. Output Specification: Your function should return the total number of configuration modulus 10^4.

Input1: Number of machine.

Input2: Maximum speed of the motor.

Output: Total number of configuration.

example:

Input1: 2

Input2: 3

Output: 2

Explanation: Possible configuration are (1,3) and (3,1).

Example2

Input1: 4

Input2: 6

Output: 24

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

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

1. What are the major sources of stress in your life?

Answered: 1 week ago