[College Maths] How to solve this without brute force

:snoo_biblethump: Pure Mathematics

Given the equation a+3b+9c+27d+81e and the letters a,b,c,d can only be given the values {-1,0,1}. How many positve whole numbers can the expression give.

Posted Apr 30, 2019, 12:00 PM UTC · edited

27
AutoModeratorMOD•

Hey Readers!

Thank you for participating in r/HomeworkHelp! This subreddit wouldn't function without you, as OPs wouldn't be helped with their homework that they are struggling with. We value your contributions, so we'd like to help to keep things organised and readable for you as much as we possibly can. Please do us a favour by reporting this question if it violates the subreddit rules and also expressively boycott this question if it falls under one or more of the following described characteristics:

1. OP demonstrates zero effort to attempt to structure the title to classify the question properly

All posts have to be flaired and written as clearly as possible unless it is impeded by language barrier.

2. OP omits instructor prompts/does not demonstrate real attempt to do the homework

We only help OPs who have tried their best but still couldn't solve/complete the question. OP has to demonstrate that he/she has already attempted the question by presenting his/her incorrect working or thoughts/process towards the question. You are encouraged to clarify with OP for instructor prompt to not waste your effort since different syllabus has different requirements/viewpoints.

3. OP is feeling very entitled

Don't worry, we aren't their slaves. If OP has the attitude "Urgent!!!", "Important!!!!" or "HELP ASAP", just skip this question.

For rule violations, please help us to report it so we can expeditiously take it down. (Along with commenting here to deter others from helping a question that is going to be removed anyway.)

IF YOU ARE AN OP, PLEASE IGNORE THE ABOVE TEXT.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1
AlkalannarMaster of Science - Mathematics•

1, 3, 9, 27, and 81 are all powers of 3.

If you look at mod 3, then -1 = 2.

So we can look at this as {0, 1, 2} for possible values.

Then this is edbca as a ternary number.

How many ternary numbers with 5 places can you make?

0
davidatomikOP•

What is a ternary number?

1
AlkalannarMaster of Science - Mathematics•

A ternary number is base 3.

Like binary numbers have all of their digits either 0 or 1.

Or decimal numbers can be 0 through 9 for each digit.

So 81 is 1000 in ternary. This can be written as 8110 = 10003 = 10100012. Note: If you aren't seeing those as subscripts, go to old reddit and it'll make sense.

1
davidatomikOP•

Wouldn’t calculating all the possible 5 character numbers also include the negative values too.

1
AlkalannarMaster of Science - Mathematics•

-1 = 2 when you're looking at mod 3.

So it all works out the same way.

1
capsandnumbers•

Okay like, we can put this situation into a clear order, making sure we count all the possible values without missing one.

First of all, they're all zero:

(0,0,0,0,0) => 0

Now let's try a = 1, we'll skip trying a as 0 or -1:

(1,0,0,0,0) => 1, that's a positive number.

Then we start thinking about b, 3b will always outweigh 1a. That means if b is positive and a is negative, then overall it'll be positive like b.

That means we have three situations:

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

(0,1,0,0,0) => 3

(-1,1,0,0,0) => 2

Where b = 1, but a can be anything it likes out of -1,0,1.

Next we have c, and notice that 9c can outweigh both 3b and 1a even if the b and a contributions are both pulling in the same direction!

(1,1,1,0,0) => 13

(-1,1,1,0,0) => 12

(-1,1,1,0,0) => 11

(1,0,1,0,0) => 10

(0,0,1,0,0) => 9

(-1,0,1,0,0) => 8

(1,-1,1,0,0) => 7

(0,-1,1,0,0) => 6

(-1,-1,1,0,0) => 5

It's almost like making the next letter along = 1 allows all the preceding letters to do whatever they like without risking a negative outcome. So for every new biggest-contribution letter, we just need to know how many different combinations we can make with the remaining ones!

This gets to what Alkalannar means about ternary numbers. With only a to play with we had 1 combination and 1 positive value for the expression. With a and b we had 3 values. Then with a, b and c we had 9.

Basically that just means "It goes up by a factor of 3 every time you add a bigger contribution letter".

Can you see where to go from there?

0