What is the task in this programming exercise?

  • Thread starter Thread starter Jerbearrrrrr
  • Start date Start date
  • Tags Tags
    Mean
Click For Summary

Discussion Overview

The discussion revolves around the interpretation of a programming exercise that asks participants to use combinations of 9, 3, and 1 pound measures to print all positive weights that can be measured from 1 to 13. Participants explore the meaning of "combinations" and whether all three weights must be used or if fewer can suffice.

Discussion Character

  • Debate/contested

Main Points Raised

  • Some participants question whether the exercise requires using all three weights or if it allows for combinations that include fewer weights.
  • One participant suggests that the phrase "using only different combinations" implies at least two weights should be used, while others argue that it could mean any combination, including using just one weight.
  • Several participants express frustration with the clarity of the question, suggesting it could be interpreted in multiple ways.
  • One participant lists various combinations and calculations to demonstrate how different weights can be achieved, indicating a belief that all integers from 1 to 13 can be represented with the given weights.
  • Another participant mentions that enumeration might be a method to solve the problem, although they express skepticism about the nature of the exercise.
  • Some participants reflect on the wording of the problem and its implications for clarity and understanding.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the interpretation of the exercise. Multiple competing views remain regarding the necessity of using all three weights versus the possibility of using fewer.

Contextual Notes

There are unresolved assumptions about the inclusivity of the range (1-13) and the interpretation of "combinations." The discussion also reflects varying levels of frustration with the phrasing of the problem.

Jerbearrrrrr
Messages
124
Reaction score
0
This isn't even my homework, but I'm disagreeing on a friend on what it's asking.
Dunno what forum to ask it in lol, sorry.

"Using only different combinations of those variables and the addition and subtraction operators, print all the positive weights that can be measured with 9, 3, and 1 pound measures (1-13). "

Do you think it means necessarily use all 3, or can you just pick (for example) one of the weights by itself and count that as a combination?

(don't need help doing the actual question, whichever it turns out to be)
 
Computer science news on Phys.org
Jerbearrrrrr said:
This isn't even my homework, but I'm disagreeing on a friend on what it's asking.
Dunno what forum to ask it in lol, sorry.

"Using only different combinations of those variables and the addition and subtraction operators, print all the positive weights that can be measured with 9, 3, and 1 pound measures (1-13). "

Do you think it means necessarily use all 3, or can you just pick (for example) one of the weights by itself and count that as a combination?

I think it just means 9x + 3y + z, 9x-3y-z, 9x-3y+z, 9x+3y-z, z-9x-3y, 3y-9x-z, etc where x,y,z are any positive integers. Since it says combinations I guess you need to use at least 2, but using all 3 is obviously the most optimal combination given the set

Or does it mean only 9 +/- 3 +/- 1 ?? Seriously, who teaches English to these math book writers
 
Last edited:
"(1-13)" is a big hint, i think
 
Good point, Proton Soup.
But it's hard to say for sure if the 1 is like...precisely "inclusive".

Also I think only one of each weight can be used.

Also, a good mathematician would make it clear >:
(using the most dull and possibly repetitive language possible)
 
Proton Soup said:
"(1-13)" is a big hint, i think

Ok so 9-3-1 is only 5lbs.

9+3+1 is 13 pounds. So you can't use all 3 to get minimum weight.

What was the point of this exercise?
 
9+3+1
9+3-1
9-3+1
9-3-1

Think that's all of them. Is this really a math problem? Christ no wonder our public school fails this is a friggin word game. I'm assuming the 9, 3, and the 1 are the "variables", unless you skipped a part of the question?
 
cronxeh said:
What was the point of this exercise?

enumeration?
 
Proton Soup said:
enumeration?

The wha?

Thats like 'find x. There it is! ---> x'


You give me 1, 3, and 9 and ask me to find (1-13). And I must say.. THERE IS 1! Oh wait it gets better. 1+3 = 13!
 
talk2glenn said:
9+3+1
9+3-1
9-3+1
9-3-1

Think that's all of them. Is this really a math problem? Christ no wonder our public school fails this is a friggin word game. I'm assuming the 9, 3, and the 1 are the "variables", unless you skipped a part of the question?

i don't think that's what it's asking.

1 = 1
2 = 3-1
3 = 3
4 = 3+1
5 = 9-3-1
6 = 9-3
7 = 9-3+1
8 = 9-1
9 = 9
10 = 9+1
11 = 9+3-1
12 = 9+3
13 = 9+3+1

so, with those three values, you can represent every integer weight between 1 and 13
 
  • #10
cronxeh said:
The wha?

Thats like 'find x. There it is! ---> x'


You give me 1, 3, and 9 and ask me to find (1-13). And I must say.. THERE IS 1! Oh wait it gets better. 1+3 = 13!

actually, i think a lot of graph theory proofs are solved by enumeration. not very proofy, but proof is proof.
 
  • #11
Jerbearrrrrr said:
This isn't even my homework, but I'm disagreeing on a friend on what it's asking.
Dunno what forum to ask it in lol, sorry.

"Using only different combinations of those variables and the addition and subtraction operators, print all the positive weights that can be measured with 9, 3, and 1 pound measures (1-13). "

Do you think it means necessarily use all 3, or can you just pick (for example) one of the weights by itself and count that as a combination?

(don't need help doing the actual question, whichever it turns out to be)

I think the question means you can use any combination of the 9lb, 3lb and 1lb measure (including not using one or two of them).
 
  • #12
I think it means that too.

Btw, it was a programming exercise. So it's "Write a program that ___".
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 0 ·
Replies
0
Views
257