Ask your own question, for FREE!
Meta-math 8 Online
ganeshie8 (ganeshie8):

\[331 = x_0 + 2x_1 + 4x_2 + \color{red}{8x_3}+16x_4 + 32x_5 + 64x_6 + 128x_7 + 256x_8\] where \(x_i = 0 ~or~1\) Find a solution if it exists \(\color{Red}{EDIT} : \text{updated the missing term, thanks to Unkle} :)\)

OpenStudy (some.random.cool.kid):

oh gee

ganeshie8 (ganeshie8):

seems you know how to solve this problem :)

OpenStudy (some.random.cool.kid):

wait cant you just add these like terms first

OpenStudy (some.random.cool.kid):

the solve backwards

OpenStudy (some.random.cool.kid):

then*

OpenStudy (some.random.cool.kid):

this looks like 2 solutions because..

OpenStudy (some.random.cool.kid):

wait am i solving this or are you putting this out there and you already know the answer.

OpenStudy (anonymous):

What like terms are there?

OpenStudy (some.random.cool.kid):

the x

OpenStudy (anonymous):

I think those are different variables

OpenStudy (some.random.cool.kid):

add each variable(like terms) and then divide by non like terms

OpenStudy (some.random.cool.kid):

i think its two solutions

ganeshie8 (ganeshie8):

yes let me update the question :)

OpenStudy (some.random.cool.kid):

ok

OpenStudy (anonymous):

Why write x_1 and x_2 and so on? I was thinking each subscript denoted a different variable

ganeshie8 (ganeshie8):

yes each subscript denotes a different variable

OpenStudy (some.random.cool.kid):

in this case am i using 0 or 1? does it matter.

OpenStudy (unanimoose):

The answer lies within your heart.

ganeshie8 (ganeshie8):

haha i think i need to give an example to make the problem more clear : Example : \(5 = x_1 + 2x_2 + 4x_3\) the solution is \(x_1 = 1,~x_2 = 0,~x_3 = 1\) because \(1 + 2(0) + 4(1) = 5\)

OpenStudy (anonymous):

Ohhh I get it now

OpenStudy (some.random.cool.kid):

oh i was just reading this .. http://arxiv-web3.library.cornell.edu/pdf/1110.6620v3.pdf

OpenStudy (some.random.cool.kid):

its something similar

OpenStudy (some.random.cool.kid):

except more broad

OpenStudy (unklerhaukus):

did you miss 8 ?

Parth (parthkohli):

The LHS is odd, so we must have \(x_1 = 1\). The remaining number is \(330\), and we have to check if we can express it in terms of the sum of powers of two. And there must be a 256 - otherwise our sum wouldn't be able to reach 330. The remaining sum is 74. It has come down to expressing 74 as a sum of powers of two. And we can certainly achieve that! \(74 = 64 + 8 + 2\). Therefore, \(331 = 1 + 2 + 8 + 64 + 256\). The other terms are zero.

Parth (parthkohli):

**assuming that there is an 8 in the sum, that is.

Parth (parthkohli):

If there is not an 8 in the sum, then we can claim that it is in fact impossible to find a solution, because I can't see any other way to express 74 as the sum of powers of two.

ganeshie8 (ganeshie8):

Sorry yes I did miss the 8 :/ PK looks good :)

Parth (parthkohli):

So it is a unique solution, yes?

OpenStudy (unklerhaukus):

\[\sum_{i=0}^82^ix_i=\begin{bmatrix}2^0&2^1&2^2&2^3&2^4&2^5&2^6&2^7&2^8\end{bmatrix}\begin{bmatrix}x_0\\x_1\\x_2\\x_3\\x_4\\x_5\\x_6\\x^7\\x_8\end{bmatrix}\]

ganeshie8 (ganeshie8):

that looks more like "binary number system" now XD

OpenStudy (unklerhaukus):

indeed

ganeshie8 (ganeshie8):

so the answer to PK's question should be yes there is an one-to-one mapping because each decimal number has an unique binary representation and each binary number has an unique decimal representation

Parth (parthkohli):

Ohhhh, I didn't think of it that way. Yeah.

ganeshie8 (ganeshie8):

Actually it can be shown easily that every super increasing series has an unique solution : \[N = a_0x_0 + a_1x_1 + a_2x_2 + \cdots + a_{n-1}x_{n-1}+a_nx_n \] if exists, there exists an unique solution provided \(a_i \gt a_0+a_1+\cdots + a_{i-1}\)

ganeshie8 (ganeshie8):

A simle example of superincreasing sequence is \(\{1,~2, ~4, ~8,~\ldots~, 2^n\}\) where \(2^i \gt 2^{i}-1 = 1+2+4+\cdots + 2^{i-1}\)

Parth (parthkohli):

That's cool. What does \(\{ x_n \}\) signify? Ones and zeroes?

ganeshie8 (ganeshie8):

yes missed that detail : \(x_i = 0/1\)

ganeshie8 (ganeshie8):

there are pretty interesting problems based on this unique solution criterion http://en.wikipedia.org/wiki/Superincreasing_sequence

Parth (parthkohli):

That is an interesting fact. I haven't studied number theory or whatever field this is, so I'm wondering how we can even prove this.

Parth (parthkohli):

Can we separate the "power" terms from the general term so as to prove it for general super-sequences?

ganeshie8 (ganeshie8):

Proving is a bit theoretic.. so its not so interesting ;) but there is an amaging application of this property : it allows two people to communicate securely in a not so safe medium. For example, using that property a bunch of people can communicate by writing letters to each other through postal service without worrying about compromising the security

OpenStudy (dan815):

this is like asking find the binary of 331

ganeshie8 (ganeshie8):

Yes exactly !

ganeshie8 (ganeshie8):

I was talking about below encryption algorithm http://en.wikipedia.org/wiki/Merkle%E2%80%93Hellman_knapsack_cryptosystem but its really easy, idk why wiki is trying hard to make it complicated

OpenStudy (unklerhaukus):

you could prove the general case for \(n\) with induction,

ganeshie8 (ganeshie8):

Induction works pretty neatly. The textbook i am refering to has this proof/general solution which can be a bit enlightnenign : \[N = a_0x_0 + a_1x_1 + a_2x_2 + \cdots + a_{n-1}x_{n-1}+a_nx_n\] Assuming there exists a solution to above, the solution is given by \[x_i = \left\{\begin{array}{}1& \text{if }N-(a_{i+1}x_{i-1}+\cdots+a_nx_n)\ge a_i\\ 0& \text{if }N-(a_{i+1}x_{i-1}+\cdots+a_nx_n)\lt a_i\\ \end{array}\right.\]

OpenStudy (fibonaccichick666):

So just a question, doesn't this whole thing just depend on if x_0=1?

ganeshie8 (ganeshie8):

I think so... \(x_0 = 0/1\) depending on \(N\) being even or odd... it was stated by PK earlier..

OpenStudy (dan815):

whats a good way to see the highest power of 2 that can go into your number

OpenStudy (dan815):

whats the function for log?

OpenStudy (dan815):

is there a better way can to floor log function

OpenStudy (dan815):

than * to

OpenStudy (fibonaccichick666):

But it has to equal 1

ganeshie8 (ganeshie8):

Oh right we need to work the highest power that goes into N as the solution is wokring from right hand side

OpenStudy (fibonaccichick666):

It's also a prime factorization

OpenStudy (dan815):

yeah

OpenStudy (fibonaccichick666):

question is, does 330 have a prime factorization that only contains twos?

ganeshie8 (ganeshie8):

because 256 < 330 < 512, we pick \(x_8 = 1\) and \(x_9=0\)

OpenStudy (fibonaccichick666):

I feel you are overcomplicating it

OpenStudy (dan815):

yeah that how u wud go about generating binary numbers fast

OpenStudy (dan815):

there might be a more efficient way

ganeshie8 (ganeshie8):

I am just working the step given in proof above

ganeshie8 (ganeshie8):

decimal to binary conversion ?

OpenStudy (dan815):

yaa

OpenStudy (fibonaccichick666):

oh, For this particular problem I would just do a prime factorization on 330, realize it's not all twos then disprove possibility of a solution

OpenStudy (fibonaccichick666):

it's like a 4-5 step disprove

OpenStudy (dan815):

all numbers below 512 are possible though

OpenStudy (fibonaccichick666):

oh, I'm thinking of straight multiplication, not the addition

OpenStudy (fibonaccichick666):

dang

OpenStudy (dan815):

its just the decimal way of writing out binary numbers so, everything below the next highest power of 2 is possible

ganeshie8 (ganeshie8):

using 9 bits we can represent number between 0 and 2^9-1

ganeshie8 (ganeshie8):

2 = (10)_2 2^2 = (100)_2 2^3 = (1000)_2 ... like this ? this is efficient for computer to work.. but still it wont tell us 2^n = what in decimal form right ?

OpenStudy (fibonaccichick666):

yea yea I see where I misinterpreted

OpenStudy (fibonaccichick666):

you can type up an algorithm

OpenStudy (dan815):

yee lets goo

ganeshie8 (ganeshie8):

basically convert the base to binary and left shift to increase the exponent

OpenStudy (fibonaccichick666):

yea

OpenStudy (fibonaccichick666):

or google haha 101001011

ganeshie8 (ganeshie8):

wolfram is also cool http://www.wolframalpha.com/input/?i=331+to+binary

OpenStudy (fibonaccichick666):

So your problem has no solution. The solution requires an x_9

OpenStudy (dan815):

hey is there a way to do log base 2 stuff with only lns

OpenStudy (fibonaccichick666):

uhm, you would have to do a conversion. So convert all log base twos into ln.

ganeshie8 (ganeshie8):

you're trying to work below efficiently ? \[2^? = N\]

OpenStudy (dan815):

ya i wanna do floor(log_2_(N)) but matlab only allows Ln

ganeshie8 (ganeshie8):

we can use change of base as fib said right ? log_2 (N) = ln(N)/ln(2)

OpenStudy (fibonaccichick666):

you remember how in calc to do other logs we used the change of base formula?

OpenStudy (fibonaccichick666):

That would be how I'd approach it at least

OpenStudy (dan815):

why does that give u change of base again

ganeshie8 (ganeshie8):

@Jhannybean hii

OpenStudy (fibonaccichick666):

haha I never proved it. But it does

OpenStudy (dan815):

hahaha

OpenStudy (dan815):

i remember doing it on here a while ago

OpenStudy (jhannybean):

@ganeshie8 heyyyyy . Heading off OS for a while again. See you guys soon :)

OpenStudy (fibonaccichick666):

Hey Jhanny!!!! Nice to see ya again, have fun!

OpenStudy (dan815):

|dw:1425708303756:dw|

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!