Question: For this project you will be designing and implementing a system, in either C or C++, to answer a few mathematical questions. First, given the

For this project you will be designing and implementing a system, in either C or C++, to answer a few mathematical questions.

First, given the number 123456789, is it possible to find a permutation (i.e. a rearrangement that preserves the count of each number) such that the left most digit is evenly divisible by 1, the two left most digits are evenly divisible by 2, the three left most digits are divisibly by 3 and so on? For example, in 123456789, 1 is evenly divisible by 1, 12 is evenly divisible by 2, 123 is evenly divisible by 3, but because 1234 is not evenly divisible by 4 this number is not a solution to the question.

Second, is it possible to find a similar permutation given the number 1234567890? Finally, is it possible to find a similar permutation for any of the given hexadecimal numbers, 1234567890AB, 1234567890ABC, 1234567890ABCD, 1234567890 ABCDE, 1234567890ABCDEF?

PS: By permutation it intends to convey the following: arrangement number or order, is a rearrangement of the elements of an ordered list S into a one-to-one correspondence with S itself. For example permutations of string ABC are: ABC, ACB, BAC, BCA, CBA, CAB.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!