You are not logged in.
I've made up some constraints to illustrate what I mean.
I'll define a large order as amount > 600
Medium as 250< amount < 600 including these endpoints
And small as amount < 250
If everything were to be reduced in the same proportion
then k = target amount / actual amount
But we want k for small to be 1, k for large to be sufficient to reach a total of 3000 and k for medium to be less than k for large.
I'll make k for medium to be 60 % of k for large.
This gives me a way to calculate k for large
The total for new large plus new medium is 3000 -200-50
So L.k + M - M(1-k)x0.6 = 2750
Rearranging k = (2750 - 0.4 x 500)/(4400 + 0.6x500)
= 0.54255...
Using this the new values are
1898, 488, 362, 200, 50 giving a total of 2998.
This is because I've rounded every calculation down.
So apply WHILE total < 3000 medium = old medium + 1 so this loops until 3000 is reached.
Bob
What's missing is an exact definition of large medium and small. Then a rule for medium reduction, say 60% of the large reduction.
I doubt C would have a specific routine for this as its too unusual. But a suitable formula could be made. I'd need the answers to the above questions
Bob
Oh yes,certainly. I just used those as examples. There's no limit to the number of possible frames.
Bob
I googled it. bbcode is a subset of HTML used by forums
The code is passed to the browser to be implemented as HTML.
Used by forums for simplicity and to keep out malicious code.
Bob
Have I told you where to look for a long list of these?
Go to help and you'll find it in the third thread.
The thread existed long before I joined but it was hidden. I stumbled on it one day and copied it into the post in help.me
The whereabouts of the original is a mystery but I've added to my version so that's the place to go.
Do I know them all? Certainly not! I don't fill my head with stuff like that
No idea why they are given those names. Someone thought it was a good name I guess.
Bob
There are many questions I would want to ask before tackling this problem.
Such as "What happens if the order total is already less than 3000?"
"If we classify the order items as large order medium order and small order then what is the largest value that makes a small , what is the smallest value that makes a large and hence we know the range for medium?"
"What if a type is out of stock?"
I'll assume the 5 types are already in ascending order of size. If not you need to perform a sort routine to get them in order
Let's call the five numbers c1, c2, c3, c4, and c5.
The final values will be d1, d2, d3, d4 and d5
.
By your rules d4 = c4 and d5 = c5.
To reduce c3 by a small amount use the formula
d3 = c3 x (3000 - d4 - d5) x 1.5 /(c1 + c2 + c3)
1.5 here was an arbitrary choice that works for these values.
It would be better if the amount to reduce was given more precisely.
With your values that makes 420 after rounding down.
d3 + d4 + d5 = 670 so c1 + c2 must be reduced to 2330
d1 = c1 x 2330/4900 and d2 = c2 x 2330/4900
4900 here is the current total and 2330 is the target total.
Those values come to1853 and 476 after rounding down.
The grand total is 2990 because of the rounding so you need a line that says while total < 3000 add 1 to d3.
Bob
Italics means sloping
Emphasis means bold
Monster? Nay! Admin have super powers to disintegrate unwanted characters. And a character has two meanings; both of which are vulnerable.
B
Yes that's about it. Or you could think of it like this.
Divide is the inverse of multiply. Turning a fraction up the other way inverts it. By doing both you maintain the "purpose" of the calculation .
Bob
Latex commands are 'called' by inserting them between the opening and closing command math
It used to be possible to suppress the action be using another bbcode command, code, but it seems to no longer work, probably happened when the forum switched to a new server. So I'll leave off the first open bracket and the last close bracket to avoid the code interpreter trying to action the code. Then I'll repeat but with all the brackets, so you can see what the command does.
math] commands here [/math
So to make a simple fraction
math] \frac{3}{4} [/math
Here's an integral
math] \int_0^\infty x^{x+2} + \alpha x .dx [/math
Years ago the member Dross wrote a tutorial to get people started https://www.mathisfunforum.com/viewtopic.php?id=4397
and others added to the thread. I find the code commands are blacked out now and some other commands no longer work but there's still a lot of useful stuff here. I go there if I want something I haven't used before eg. the infinity in the line above.
You can also do an internet search for the right command but this can be frustrating as not all are implemented here.
^ for to the power of works simply if followed by a single character eg
math] x^7 [/math
but if you want a more complicated power the power must be enclosed in {}
math] x^{y + 7} [/math
Otherwise this happens
If you see some Latex and want to see the underlying commands just click on it.
Hope that gets you started.
Bob
To divide by a fraction, invert it and multiply.
Do you know why this works? **
**
Multiply top and bottom by d/c
bbcode: Get started here: https://www.mathisfunforum.com/viewtopic.php?id=4397
If you click on any part of the above you will see the underlying code.
It looks complicated because of the nested fractions. The command for a fraction is \frac{numerator}{denominator}
I often get in a muddle with the number of {{{ }}}.
What is not shown by that is that each line starts square bracket math and ends square bracket /math
Bob
Usually I can answer your questions based on what I was taught and passed on in my own teaching. This one is the exception. In all the Newtonian mechanics and physics questions I have encountered, inertia has never occurred.
I had to go up in my loft and get down all my old texts on applied maths and physics. Some just refer to Newton and basically say bodies possess the property of inertia, that is they do not accelerate unless acted upon by an external force.
I also tried googling the units for inertia. I got two answers:
Mass is a measure of an object's inertia. The more mass an object has, the more inertia it has.
The SI unit for inertia is kilogram-meter squared (kg⋅m²). While the term "inertia" is often used to refer to an object's resistance to changes in motion, the actual concept of resistance to change is often referred to as moment of inertia. The moment of inertia is a measure of how an object resists rotational acceleration.
The first is inertia as it applies to linear motion and the second to rotating objects.
The measure of linear kinetic energy is 1/5 . m . v^2 and for rotating objects 1/2 . I / w^2 where I is the moment of inertia and w the angular velocity.
We're not the only ones confused. Have a look at this thread :
https://physics.stackexchange.com/quest … n-stopping
So there we are. Everyone is confused and there's no one answer.
LATER EDIT: I've given this some over-night thought. For an object with zero or uniform velocity it's inertia is because of its mass. More mass, more inertia. It's actual velocity is irrelevant. The Earth rotates on its axis, and around the Sun, which in turn, rotates around the centre of the Galaxy, which is moving relative to other galaxies. That's why we have the concept of frames of reference.
If you consider that trolley going at various speeds, then, yes, the amount of force to reduce that velocity to zero will vary, but that doesn't alter its inertia. It just gives you the means to do the calculation. If you set up a frame of reference that travels at 6 m/s in the second case, then the trolley is only travelling at 6 m/s relative to that frame and so can be 'brought to rest' in the frame with the same effort as the first case.
Momentum gives you a way to measure the force required, but I showed in a previous post that impulse is just a way of applying v = u + at to determine F.
Bob
Yes, that's right for all those calcs. The laws of motion work the same for both situations.
Bob
It looks like a homework assignment. As a teacher I'd prefer that members don't just do the work for someone. You could see if you can write a program but don't post it. That way if RegJose comes back with a request for specific help you're well prepared even if your version isn't quite what the assignment requires.
Bob
I very much doubt it as this isn't a way that economists work. If you're in business and you've got two products to sell, one (A) in plentiful supply and the other (B) in only small quantities, you create a business model where you try to sell lots of A in preference to B. In this post the opposite is applied ie keep supply of A down but maintain B as much as possible. An economics course would only have that as a question if the teachers wanted to ask "What is wrong with this model?"
It looks like an exercise that might occur in a C language course. In my experience programmers usually know nothing about the real world. I might be wrong of course .
Bob
A C function is a computer program routine written in the language C.
This scenario is clearly artificial as no business person would, given the choice, send out all of the product that is in low supply whilst restricting amounts of the product in plentiful supply. That's a topsy turvy law of supply and demand. I conclude this is a homework assignment.
On this forum we don't do people's homework. If, RegJose, you have most of the code written, but are stuck over one issue, post what you've done and perhaps someone will be able to help with that.
Bob
hi RegJose
Welcome to the forum.
I'm not understanding this problem.
Consider these three or more lists of integer values:
[30, 0, 100, 50, 30] = 210, Importance = 100
[20, 40, 90, 10, 0] = 160, Importance = 80
[1, 10, 30, 0, 500] = 550, Importance = 60
The equals looks like you're adding the integers inside the square brackets eg 30 + 0 + 100 + 50 + 30 = 210
But 1 + 10 + 30 + 0 + 500 ≠ 550 so is my interpretation correct and there's a typo here. If not then how does the square bracket numbers give the number after the equals?
Importance looks like its the biggest number inside the square brackets eg 100 is the biggest in the first set. But that fails for the other two sets, so how are you defining importance?
Once I'm clear on those issues it'll be worth reading on.
Thanks,
Bob
hi Filte1943
Welcome to the forum.
I'm not very confident with series limits but I'll have a go.
The ratio test is
Where a(n) is the general term of the series.
If L < 1 then the series converges.
In your case:
This will tend to 1 from below. The ratio test is inconclusive in such a case.
LATER EDIT: Found this: https://math.stackexchange.com/question … o-infinity
Bob
hi Dark,
Welcome to the forum.
Plenty to exercise the mind here; but not the legs I'm sorry.
What's your spider's name?
Bob
hi paulb203
Good to hear from you.
Your answer is correct. The working obviouly works but there are one thing not quite right about what you've written.
Back to basics:
So 11.9 isn't in Newtons as it's an impulse not a force. What are the units for impulse? Ns ie Newton seconds. So you are not subtracting Newtons from Ns. The equation underlying this calculation is
I had
That gives V = 47 m/s
Bob
If you draw a velocity-time graph it goes from (0,0) to (1,10)
The distance travelled is the area under the graph; 0.5 x 1 x 10 = 5m.
The average velocity is total distance travelled / time taken = 5/1 = 5.
So that's the correct answer.
From 0 sec to 1/10 sec the area under is
0.5 x 1/10 x 1 = 0.05 m = distance travelled
so the velocity over that interval is 0.05 / 0.1 = 0.5 m
You are using 1m ... that value is too big. The correct value for each interval is the half way one not the endpoint one.
This happens for every interval from 0.1s to 1s.
So the correct average by this method is
(0.5 + 1.5 + 2.5 + 3.5 + 4.5 + 5.5 + 6.5 + 7.5 + 8.5 + 9.5)/10 =(5 + 45)/10 = 5 m/s
Bob
I learnt it as conservation of momentum. Your calculation is correct. But should need to add emphasis concerning direction.
So start by declaring you are taking East as the positive direction and end by stating the combined object travels East at 2/3 m/s.
Bob
A frame of reference is just a way to formulate the model of a problem by placing one object at rest. eg. If I'm on a train (speed T) looking at a cyclist (speed C) alongside the track, I can make my frame of reference the train, in which case the cyclist appears to be going at
speed T-C.
As no acceleration is involved the frame is said to be inertial.
If you wish to analyse the rotational properties of the Earth, the oceans and the winds, then acceleration is involved because a rotating object needs a central acceleration in order to follow a circular path. The frame of reference in non inertial.
So u mean gravity is relative?
Not sure how to answer this. If you mean that the gravity I measure could be different from someone else's measurement of the same gravity, the best I can come up with is maybe.
When scientists measure the gravitational pull of the Earth they get the same answer if they measure at the same place (it does vary around the surface of the Earth) but if you tried to measure gravity in a moving lift you would get a different result from a static lift.
Bob
What you call it isn't important. The calculation is
Decide on a positive direction (either will do but then use it throughout).
As the objects are travelling towards each other one v will be + and the other - .
Bob
Sorry I used 'embed'. I just mean consider the situation from the ball's viewpoint. So what if you're an ant on the ball. Then yes that means the Earth is now moving.
We do this all the time. If you're in a car or train, the world seems to be moving past. Just standing on the Earth we see the Sun, Moon and stars rotating above our head.
Thanks for the calculation. I think we can safely ignore the Earth's movement here.
Bob
hi again.
I've partly answered your other number base question. But this one ??? Did you just throw together some numbers to ask this?
In any number case the column headings are n^3 n^2 n and units.
The only digits that are allowed are those smaller than n.
So
2538 base five
would never occur. 5 and 8 don't exist as digits in base 5.
Bob
If you want more help on number bases you could look here:
https://www.mathsisfun.com/numbers/bases.html
or post again, but not in this area of the forum, but rather in the help me section.
Bob