Multiple of 3

This topic has expert replies
Senior | Next Rank: 100 Posts
Posts: 56
Joined: Tue Apr 12, 2011 9:07 am
Thanked: 5 times
Followed by:1 members

Multiple of 3

by nycknicks11 » Mon May 09, 2011 7:08 pm
I just ran across a DS problem requiring you to know whether there are more than one combination of a set of numbers that will satisfy this:

Even multiple of 3 + a multiple of 3 = 135

Is there a way to use number property to solve this?

Master | Next Rank: 500 Posts
Posts: 218
Joined: Sat Jul 24, 2010 2:43 pm
Thanked: 5 times

by cyrwr1 » Mon May 09, 2011 7:12 pm
Please post the whole question.

Your question can be rewritten as:
3(2a)+3(b)=135
2a+b=45 ; I'm pretty sure the question tells you positive multiples. Find out how many combinations satisfy that equation.

Senior | Next Rank: 100 Posts
Posts: 56
Joined: Tue Apr 12, 2011 9:07 am
Thanked: 5 times
Followed by:1 members

by nycknicks11 » Mon May 09, 2011 7:30 pm
it's literally that. yes positives and integers.

even mult. of 3 is basically multiple of 6. So I just started pluggin numbers. Just wondering if theres even a quicker way.

I also tried 2a=3(45-b) but this took longer. 45-b must be even so b must be odd. etc..

User avatar
Legendary Member
Posts: 516
Joined: Fri Jul 31, 2009 3:22 pm
Thanked: 112 times
Followed by:13 members

by smackmartine » Mon May 09, 2011 11:27 pm
Rule: Even + Odd = Odd

Given, Even multiple of 3 + a multiple of 3 = 135
Keep it simple
case 1 :126 (Even multiple of 3) + 9(a multiple of 3) = 135
case 2 :132(Even multiple of 3) + 3(a multiple of 3) = 135

So, there can be more than one combinations that add to 135. Hope this answers your question.

Master | Next Rank: 500 Posts
Posts: 218
Joined: Sat Jul 24, 2010 2:43 pm
Thanked: 5 times

by cyrwr1 » Tue May 10, 2011 7:24 am
Just to clarify my point.

When you have 2a+b=45 and you need to find how many combinations of positive integers are there?

just divide the 45 by 2(coefficient in front of "a"), you will find 22 ways in which the equations can work.

a can be(1,2,..,21,22)

I hope I answered your question

Senior | Next Rank: 100 Posts
Posts: 56
Joined: Tue Apr 12, 2011 9:07 am
Thanked: 5 times
Followed by:1 members

by nycknicks11 » Tue May 10, 2011 6:00 pm
damn, good point cywr.