How to Use Gaussian Elimination to Solve for Vitamin Pills

Click For Summary
The discussion revolves around using Gaussian elimination to solve a problem involving vitamin pill combinations to meet specific daily requirements. Participants clarify the setup of the augmented matrix and the equations representing the number of pills from three brands. It is established that while there are infinite solutions mathematically, only a finite number of nonnegative whole number solutions exist. The key takeaway is that the values of b1, b2, and b3 (the number of pills from each brand) can be determined by setting constraints on b3, leading to a finite set of combinations that satisfy the vitamin requirements. Ultimately, six valid combinations of pills that meet the doctor's prescription are identified.
  • #31
sdoug041 said:
Ok I see.

If b3 >= 0 , and say b3 was indeed 0, then b2 would have to be -3 to satisfy the equation. Does this mean b3 should be 3<=b3<=8, and 0<=b1<= 5?

Yes, yes, yes. What about b2? Now how many total solutions are there to your pill taking needs?
 
Physics news on Phys.org
  • #32
memomator said:
The question states. Find all combination of pills that provide you with the exact daily requirement(no partial pill). How will I find all the combination of pills, knowing only the number of pills in brand 1, 2, and 3.

"the number of pills in brand 1, 2, and 3" is what you need to specify a "combination of pills". For example, from your equations I see 3 pills of brand 3, 5 pills of brand 1 and 0 pills of brand 2 is one solution. How many more are there?
 
  • #33
Ok so 0<=b2<=5

I've found 6 possible solutions for the equations :D

Thanks alot, Dick.
 
  • #34
Ok i understand that now, is there an easier way to find out how many solutions there are other than plugging into numbers.
 
  • #35
memomator said:
Ok i understand that now, is there an easier way to find out how many solutions there are other than plugging into numbers.

Sure, b1+b3=8 tells you you need b3<=8 to make b1 nonnegative. b2-b3=(-3) tells you you need b3>=3 to make b2 nonnegative. Put them together and you have 3<=b3<=8 with the other values being b1=8-b3 and b2=(-3)+b3. You could also write the answer that way instead of spelling out the explicit values of b1 and b2.
 
  • #36
Thank you very much Dick, I finally understand. You have 6 solutions. Because B3 is between 3 and 8 and the numbers between 3 and 8 are solutions and you take those number and sub them into the other equation to find out b1 and b2.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
1K
Replies
8
Views
2K
  • · Replies 25 ·
Replies
25
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
4
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K