Question

In: Computer Science

Let’s define a new number system, where we represent a number by the remainder we get...

Let’s define a new number system, where we represent a number by the remainder we get on
dividing by successive primes, i.e., by 2, 3, 5, 7, 11, 13, 17, etc. Thus, 15 might be represented as
[1,0,0], and 27 might be [1,0,2].

1.) What numbers do [1, 1, 1, 1] and [1, 2, 3, 4] represent? Are the representations unique? What
other numbers might these lists represent?

2.) We know that 15 + 27 = 42. What is the representation of 42? Can you see how to get this from
the representations for 15 and 27?

Solutions

Expert Solution

1.) What numbers do [1, 1, 1, 1] and [1, 2, 3, 4] represent? Are the representations unique? What
other numbers might these lists represent?

=> Clearly the representations will all not be unique in this new number system.only some will have unique representations.

As [1,1,1,1] can be any number which is having a remainder of 1 on dividing it with the first four primes (2,3,5,7),

so when we multiply all these primes i.e ( 2 * 3 * 5 * 7) = 210. So now if we add one to this number then it is "211".

now 211 when divided by either 2 or 3 or 5 or 7, we get one as the remainder.

So 211 is represented as [1,1,1,1].

Similarly if we multiply the number 210 with any of the multiples of the primes used to represent it and then add 1 to the number obtained we get another number which is having a remainder of 1 on dividing it with the first four primes (2,3,5,7).

for e.g (210*2+1) = 421 will also be represented by [1,1,1,1].

Similarly [1,2,3,4] , now we want to find a solution to x where

x%2=1      x%3=2 x%5=3 x%7=4

we use the "Chinese Remainder Theorem" ,

Since 2, 3, 5, and 7 are pairwise relatively prime, the Chinese Remainder Theorem tells us that there is a unique solution modulo m, where m = 2*3*5*7 = 210

We apply the technique of the Chinese Remainder Theorem with k = 4,

m1 = 2, m2 = 3, m3 = 5, m4 = 7 and

a1 = 1, a2 = 2, a3 = 3, a4 = 4

z1 = m / m1 = m2*m3*m4 = 3*5*7 = 105

z2 = m / m2 = m1*m3*m4 = 2*5*7 = 70

z3 = m / m3 = m1*m2*m4 = 2*3*7 = 42

z4 = m / m4 = m1*m2*m3 = 2*3*5 = 30

( Inverse of a number "n" modulo number "y" is a number "f" such that (f*n)mod(y) = 1 )

y1 ≡ z1 -1 (mod m1) ≡ 150-1 (mod 2) ≡ Modular inverse does not exist i.e no solution exists

y2 ≡ z2 -1(mod m2) ≡ 70-1 (mod 3) ≡ 1

y3 ≡ z3 -1 (mod m3) ≡ 42-1 (mod 5) ≡ 3

y4 ≡ z4 -1 (mod m4) ≡ 50-1 (mod 7) ≡ 1

If had there been all the values present, following steps needs to be performed in order to find the value x,

w1 ≡ y1z1 (mod m)

w2 ≡ y2z2 (mod m)

w3 ≡ y3z3 (mod m)

w4 ≡ y4z4 (mod m)

The solution, which is unique modulo m, is

x ≡ a1w1 + a2w2 + a3w3 + a4w4 (mod m)

so there cannot be a number which can be represented as [1,2,3,4] in this number system.

*********************************************************************************************************************************

2.) We know that 15 + 27 = 42. What is the representation of 42? Can you see how to get this from
the representations for 15 and 27?

let us represent both the numbers as remainders when divided by numbers

[ 2,3,5,7,11,13 ]

15 ==========> ( 1,0,0,1, 4, 2)

27 ==========> ( 1,0,2,6, 5, 1)

42 ==========> ( 0,0,2,0, 9, 3)

so now if you observe, the first digits in all the above representations, we have

1 for 15

1 for 27

and if we add them (1+1) and divide this result by 2, the remainder obtained is 0, which is the first digit for 42.

similarly for every consecutive digits in the representation we can see this result being satisfied.

( 0 + 0 ) % 3 = 0 which is second digit in representation of 42.

( 0 + 2 ) % 5 = 2 which is third digit in representation of 42.

( 1 + 6 ) % 7 = 0 which is fourth digit in representation of 42.

( 4 + 5 ) % 11 = 9 which is fifth digit in representation of 42.

( 2 + 1 ) % 13 = 3 which is sixth digit in representation of 42.


Related Solutions

Define multiplication on ℤ? by ? ⊙ ? = ? where ? is the remainder when...
Define multiplication on ℤ? by ? ⊙ ? = ? where ? is the remainder when the product ?? is divided by ?. (a) Show that this operation is commutative. (b) Show that this operation is associative. (c) Show that there is an identity element for this operation. (d) Show that for ? = 5, the set of non-zero elements forms a group under multiplication. (e) Show that for ? = 6, the set of non-zero elements does not form...
where did we get the dividend rate?
where did we get the dividend rate?
Formulate the situation as a system of inequalities. (Let x represent the number of goats the...
Formulate the situation as a system of inequalities. (Let x represent the number of goats the farmer can raise and y represent the number of llamas.) A rancher raises goats and llamas on his 800-acre ranch. Each goat needs 4 acres of land and requires $70 of veterinary care per year, while each llama needs 10 acres of land and requires $56 of veterinary care per year. If the rancher can afford no more than $9,240 for veterinary care this...
Since we will spend plenty of time exploring the traditional parts of the financial system, let’s...
Since we will spend plenty of time exploring the traditional parts of the financial system, let’s discuss an emerging area which is virtual currencies. How do virtual currencies work and what role do you think they will play in the economy going forward?
Define different types of UML diagram needed to represent theessential features of a system?
Define different types of UML diagram needed to represent the essential features of a system?
Define different types of UML diagram needed to represent the essential features of a system? Distinguish...
Define different types of UML diagram needed to represent the essential features of a system? Distinguish among the fundamental architectural views proposed in Krutchen’s 4+ 1 model. Compare between functional and non-functional requirements with example for each. Define Capability Maturity Model (CMM) and the different levels of CMM.
Total quality management emphasizes A.  a process where mostly statisticians get involved. B.  a system where...
Total quality management emphasizes A.  a process where mostly statisticians get involved. B.  a system where strong managers are the only decision makers. C. the responsibility of the quality control staff to identify and solve all quality-related problems. D. ISO 14000 certification E. a commitment to quality that goes beyond internal company issues to suppliers and customers.
Where did most of the interplanetary fragments in the outer solar system get flung to by...
Where did most of the interplanetary fragments in the outer solar system get flung to by the larger gas planets?
: Let’s consider second-law thermodynamics again, we define Suniv=Ssys + Ssurr Explain the physical meaning of...
: Let’s consider second-law thermodynamics again, we define Suniv=Ssys + Ssurr Explain the physical meaning of three symbols here: Suniv, Ssys , Ssurr Which of these three determines if a proposed process is spontaneous or not? State what sign it needs to be for the proposed process to be spontaneous?
A four-bit binary number is represented as A3A2A1A0, where A3, A2, A1, and A0 represent the...
A four-bit binary number is represented as A3A2A1A0, where A3, A2, A1, and A0 represent the individual bits and A0 is equal to the LSB. Design a logic circuit that will produce a HIGH output whenever the binary number is greater than 0010 and less than 1000. how can I do this by using sum of product, not K map
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT