subject
Engineering, 22.02.2021 19:40 loveuncondition

Enigma - The electro-mechanical cipher machine was developed to protect communication in the mid-20th century. Following the principles of the Enigma, a modified Enigma machine is developed having rotorCount rotors labeled from 1 to rotorCount. Each rotor has a value that can be set between minRotorValue and maxRotorValue, inclusive. To make the machine work, the values set in the 2 through rotorCount rotors should have a greatest common divisor with rotor 1 of 1. In other words, they should be set to a number that is coprime with the setting of rotor 1. Calculate the number of possible configurationin which rotor can be set. For example,
RotorCount = 3, minRotorValue = 2, maxRotorValue = 3
Possible Combination = (2,3,3), (3,2,2), (3,2,4), (3,4,2), (3,4,4), (4,3,3)
All other combination are invalid, as they are not coprimes with rotor 1.
Input Type: RotorCount, minRotorValue, maxRotorValue
Output: No of valid combinations
Sample Input1: 2, 1, 3
Output: 7
Sample Input 2: 3, 2, 6
Output: 34

ansver
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, xboxdude06
Slip occurs via two partial dislocations because of (a) the shorter path of the partial dislocation lines; (b) the lower energy state through partial dislocations; (c) the charge balance.
Answers: 1
image
Engineering, 04.07.2019 18:10, Strick1530
Which of the following components of a pid controlled accumulates the error over time and responds to system error after the error has been accumulated? a)- proportional b)- derivative c)- integral d)- on/off.
Answers: 2
image
Engineering, 04.07.2019 18:10, selenamr
Ifa component is made of two or more materials with different modulus of elasticity (e), it is called a composite member and we calculate the factor·n". mention the formula for calculating n". also, ifn> 1, explain what will happen to the 1. transformed. gi) ifn 1, what will happen to the material when transformed material when
Answers: 1
image
Engineering, 04.07.2019 18:10, 0436500
Aturning operation is performed with following conditions: rake angle of 12°, a feed of 0.35 mm/rev, and a depth of cut of 1.1 mm. the work piece is aluminum alloy 6061 with t6 heat treatment (a16061-t6). the resultant chip thickness was measured to be 1.0 mm. estimate the cutting force, fc. use shear stress of 207 mpa and coefficient of friction on the tool face of 0.6.
Answers: 1
You know the right answer?
Enigma - The electro-mechanical cipher machine was developed to protect communication in the mid-20t...

Questions in other subjects: