473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Farmer's Market

coolgames
169 100+
A farmer has to move 100 pumpkins from his farm to a market. He uses carts for carrying the pumpkins. Each cart can hold a maximum of 10 pumpkins. There are 10 toll stations on the way to the market. They charge 1 pumpkin per each cart as fee. How many pumpkins can he sell in the market ??

Have Fun,
Coolgames

Note: All this is genetated by ME...
Oct 4 '07 #1
11 1285
RedSon
5,000 Expert 4TB
A farmer has to move 100 pumpkins from his farm to a market. He uses carts for carrying the pumpkins. Each cart can hold a maximum of 10 pumpkins. There are 10 toll stations on the way to the market. They charge 1 pumpkin per each cart as fee. How many pumpkins can he sell in the market ??

Have Fun,
Coolgames

Note: All this is genetated by ME...
This is the same as:
A farmer has 10 pumpkins that he wants to sell, each of his carts can hold 1 pumpkin. There is 1 toll station on the way to the market, it charges 1 pumpkin per each cart as a fee. Simple to figure out now, no?
Oct 4 '07 #2
coolgames
169 100+
not exactly..
just if you reduce the numbers, you will deffinately end up with a WRONG answer...
Oct 4 '07 #3
kadghar
1,295 Expert 1GB
not exactly..
just if you reduce the numbers, you will deffinately end up with a WRONG answer...
i think they are 32

since he can leave carts in the toll stations
Oct 4 '07 #4
jkmyoung
2,057 Expert 2GB
Well, if he only uses the carts:
Start
100 pumpkins, 10 carts

Does he have to pay the toll as soon as he reaches the toll booth or after? Here we assume as soon as.

1st toll 10 pumpkins. Remaining:
90 pumpkins. 9 carts, ditch one. (he'll be able to get it on his way back)

2nd toll 9 pumpkins. Remaining:
81 pumpkins. 9 carts. Here, he might as well ditch 1 pumpkin and 1 cart for later too, leaving 80 pumpkins. 8 carts

3rd toll 8 pumpkins. Remaining:
72 pumpkins, 8 carts.

4th toll 8 pumpkins. Remaining
64 pumpkins, 7 carts, ditch 1 cart.

5th toll 7 pumpkins. Remaining:
57 pumpkins, 6 carts, ditch 1 cart.

6th toll 6 pumpkins. Remaining
51 pumpkins, 6 carts. Ditch an extra pumpkin and cart leaving
50 pumpkins, 5 carts.

7th toll 5 pumpkins. Remaining:
45 pumpkins, 5 carts.

8th toll 5 pumpkins. Remaining:
40 pumpkins 4 carts. ditch 1 cart.

9th toll 4 pumpkins. Remaining:
36 pumpkins 4 carts.

10th toll 4 pumpkins. Remaining:
32 pumpkins. 4 carts.

The farmer can make it with 32 pumpkins total.
Left at each of the toll booths:
1: 10 pumpkins toll, 1 cart
2: 9 pumpkins toll, 1 cart, 1 extra pumpkin
3. 8 pumpkins
4. 8 pumpkins, 1 cart
5. 7 pumpkins, 1 cart
6. 6 pumpkins, 1 cart, 1 extra pumpkin.
7. 5 pumpkins.
8. 5 pumpkins, 1 cart.
9. 4 pumpkins.
10. 4 pumpkins.

What does he do with the extra pumpkin left at the 2nd and 6th station? smash them.
Why not just carry the extra pumpkin to the next station and pay with it for the extra cart? I don't know, but I'm against giving extra taxes to the man, lol.

If the farmer only has to pay to cross with the cart:
1: pay 9 pumpkins, leave an extra pumpkin and cart behind. Continue with
90 pumpkins, 9 carts
2: pay 9 pumpkins. Continue with
81 pumpkins, 9 carts
3: pay 8 pumpkins. Leave a cart behind. Continue with:
73 pumpkins, 8 carts
4: pay 7 pumpkins. Leave a cart behind. Continue with:
66 pumpkins, 7 carts.
5: pay 6 pumpkins, Leave a cart behind. Continue with:
60 pumpkins, 6 carts.
6: pay 6 pumpkins. Continue with:
54 pumpkins, 6 carts.
7: pay 5 pumpkins. Leave a cart behind. Continue with:
49 pumpkins, 5 carts.
8: pay 5 pumpkins. Continue with:
44 pumpkins, 5 carts.
9: pay 4 pumpkins. Leave a cart behind. Continue with:
40 pumpkins, 4 carts.
10: pay 4 pumpkins. Left with:
36 pumpkins.
A 4 pumpkin difference if the farmer is allowed to do it this way.

I wonder what would happen if the toll booths would be willing to take carts instead of a pumpkins
Oct 4 '07 #5
RedSon
5,000 Expert 4TB

I wonder what would happen if the toll booths would be willing to take carts instead of a pumpkins
Good question, what is the answer then if the toll booths will take either a pumpkin or cart as payment, also, you forgot to consider how the farmer will get back to his home with these carts, or do you assume that he only has himself and one cart to take him back, while leaving the rest at the market?
Oct 4 '07 #6
kadghar
1,295 Expert 1GB
Good question, what is the answer then if the toll booths will take either a pumpkin or cart as payment, also, you forgot to consider how the farmer will get back to his home with these carts, or do you assume that he only has himself and one cart to take him back, while leaving the rest at the market?
that's true!!

he'll have to sell only 22 pumkins and keep 10 and a cart to go back home.

or may be the toll stations fee is 1 pumpkin for the round trip.
Oct 4 '07 #7
coolgames
169 100+
good work... i've never had anyone explain it very eloberately before..


Coolgames
Oct 4 '07 #8
YarrOfDoom
1,247 Expert 1GB
I would have tought of this as:

He needs to get 100 pumpkins to the market, so he takes some extra to pay the fee and so he arrives witth 100 pumpkins.
Oct 4 '07 #9
coolgames
169 100+
I would have tought of this as:

He needs to get 100 pumpkins to the market, so he takes some extra to pay the fee and so he arrives witth 100 pumpkins.
why would think that ??
the Q' clearly explains...

if it is not clear to you, i am sorry.
Coolgames
Oct 4 '07 #10
Banfa
9,065 Expert Mod 8TB
What does he do with the extra pumpkin left at the 2nd and 6th station? smash them.
Why not just carry the extra pumpkin to the next station and pay with it for the extra cart? I don't know, but I'm against giving extra taxes to the man, lol.
I would have thought the obvious answer is to leave the at home, only setting out with 98 pumpkins then when he gets home he can have pumpkin pie for tea.
Oct 5 '07 #11
coolgames
169 100+
I would have thought the obvious answer is to leave the at home, only setting out with 98 pumpkins then when he gets home he can have pumpkin pie for tea.

** laughs ** Yummy..
my mom never makes me yummy stuff...
Oct 5 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Joseph,,, | last post by:
I've seen data about database market share that shows IBM slightly ahead of Oracle. However, looking at the data with a finer granularity shows IBM with a huge lead in market share in the...
346
by: rkusenet | last post by:
http://biz.yahoo.com/rc/040526/tech_database_marketshare_1.html Interesting to see that database sales for windows is more than Unix.
68
by: rkusenet | last post by:
http://www.eweek.com/article2/0,1759,1820667,00.asp The database market grew by 10.3 percent in 2004, fueled largely by hunger for business intelligence and analytics, according to numbers...
0
by: L'eau Prosper Research | last post by:
Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases new TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set. L'eau Prosper Market...
0
by: L'eau Prosper Research | last post by:
NEW TradeStation 8 Add-on - L'eau Prosper Market Manipulation Profiling Tools Set By L'eau Prosper Research Press Release: L'eau Prosper Research (Website: http://www.leauprosper.com) releases...
4
by: webster5u | last post by:
Hi, I'm webster. I need some help again. I currently doing research report on the JEE web application. Who's know any up-to-date research report about JEE or JSP occupy web application market. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.