Prove that in a self-complementing code the sum of the
weights must be 9?

Answer Posted / aamod joshi

Lets assume that the weights are w1,w2,w3 and w4.

Assume the first code is X1X2X3X4 and second number is
Y1Y2Y3Y4 where X1X2X3X4 + Y1Y2Y3Y4 = 9. e.g. if the weights
are 2,4,2,1 then 1011 = (1*2)+(0*4)+(1*2)+(1*2) = 5 and
0100 = (0*2)+(1*4)+(0*2)+(0*2)= 4 i.e. 1011+0100=4+5=9.

Putting this in mathematical equation,
(W1X1 + W2X2 + W3X3 + W4X4)
+ (W1Y1 + W2Y2 + W3Y3 + W4y4)
= 9

Which means
W1(X1+Y1) + W2 (X2+Y2) + W3 (X3+Y3) + W4 (X4+Y4) = 9

Now, as X1X2X3X4 and Y1Y2Y3Y4 are self-complementing, at a
time either of X1 and Y1 can be 1, the other will be zero.
Same for X2,Y2 and X3,Y3 and X4,Y4. Which further means
that X1+Y1 = 1, X2+Y2=1, X3+Y3=1, X4+Y4=1.

So,
W1(1) + W2(1) + W3(1) + W4(1) = 9

i.e. W1+W2+W3+W4 = 9 thus it proves that sum of the weights
has to be 9.

Is This Answer Correct ?    86 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i possess a little knowledge of core java . so is it will be difficult for me to start advanced java?

1494


how to handle errors in fastload?

1650


what is the difference between C and C++? what is the difference between scanf and gets? what is mean by extern what is the use of it? what will happen if i say delete this> Difference between C structure and C++ structure? What is the difference between overloading and overridding? Explain the need for "virtual Destructor" Can we have "virtual Constructors"? What is the different types of polymorphism> What is virtual functions? How to implement virtual function in "C"? What are the different types of storage classes?

1713


If you had a cylinder, sealed at both ends, with the pressure rising inside, would it blow at the end or split along the side first?

1734


What do you mean by component versionig?

1444






what is domain functional level in windows server 2003?

1690


1) There is a circular pizza with negligible thickness that is cut into 'x' pieces by 4 straight line cuts. What is the maximum and minimum value of 'x' respectively 2)A ship leaves on a long voyage. When it is 18 miles from the shore, a seaplane, whose speed is 10 times that of the ship is sent to deliver mail. How far from the shore does the seaplane catch upon with the ship? 3) If the distance traveled (s) in time (t) by a particle is given by the formula s = 1+ 2t+3t2+4t3, then what is the distance traveled in the 4th second of its motion? 4)3 men finish painting a wall in 8 days. Four boys do the same job in 7 days. In how many days will 2 men and 2 boys working together paint two such walls of the same size?

3203


while installing jad file to mobile its giving processing attribute MDlet-jar-URL error...how to fix it

1660


I have completed my B.E with (CSE) computer science and engineering ,i had a total no of backlogs=20 ,is there any chances to get the visa PLEASE HELP ME NE1 : MY ID=john_searchig143@yahoo.com .

1435


draw diagram of earthings

1516


Iam preparing for Visakhapatnam Management Trainee 2009 entrance exam.. If anybody have Visakhapatnam Management Trainee Interview questions Pls forward to my mail id srikanth.avanthi@gmail.com .. It is kindly request..

1430


Difference between software process model and software process.?

1493


I have file with input as below : Name Value Rohan 12,13,14 Rohit 1,2,3 Output should be : Rohan 12 Rohan 13 Rohan 14 Here how will the normalize component work? Thanks

971


Please explain why you are suitable for the position that you have applied for?

1605


Explain a situation in which you handled a customer?s questions or problems?

1470