All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
Total Toothpaste (Posted on 2004-02-16) Difficulty: 3 of 5
When it's time to squeeze out toothpaste, one method is to press down on one particular "zone" of the toothpaste tube. This way, half of the toothpaste will squirt in each direction except for the zone at the end of the tube. When toothpaste squirts out the zone at the front of the tube, it comes out onto your toothbrush.

The problem is a person who uses this toothpaste-squeezing method has to go in for a dentist visit tomorrow, and he haven't even opened his tube of toothpaste. He figure if he can get 99% of the toothpaste on his toothbrush and brush with it, he will have shiny teeth. It's late at night and he doesn't want to have to squeeze the toothpaste tube more than neccesary.

A) What would be the best squeezing strategy if the tube had 3 zones? 4 zones?

B) Is there a best strategy that could apply for any number of zones?

Example:
Toothpaste tube-> |4321=
1/4, 1/4, 1/4, 1/4, (  0 OUT) Press 3:
3/8,    , 3/8, 1/4, (  0 OUT) Press 1:
3/8,    , 1/2,    , (1/8 OUT) Press 2:
3/8, 1/4,    , 1/4, (1/8 OUT) Press 4:
   , 5/8,    , 1/4, (1/8 OUT)
(Assume any part of the tube can have any amount of toothpaste in it, you can only push in the middle of a zone, and the person will not get sick from toothpaste intake.)

See The Solution Submitted by Gamer    
Rating: 4.4000 (5 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
A thought Comment 5 of 5 |
this problem could be thought of like this:
let's define a "center of gravity" for the toothpaste:
let's assume X1,X2,X3,X4,X5 is the amount of toothpase in zones 1,2,3,4,5 accordingly (When zone 5 is the outside of the tube).
now we'll define the center of gravity by:
c = 1*X1 + 2*X2 + 3*X3 + 4*X4 + 5*X5

when we are done, and 99% of the toothpaste is out of the tube:

c >= 5 * X5 = 5*99.

now note that when we press any of the zones 2,3,4 - the value of c does NOT change, because, for example, if we press zone 2:

1 * x1 + 2 * x2 + 3 * x3 = 1 * x1 + 0.5 * 1 * x2 + 0.5 * 3 * x2 + 3 * x3

(because for all n: n = 0.5*(n-1) + 0.5(n+1)).

so we can see that we can only increase the center of gravity by pressing zone number one, and we increase it by the value of X1. so now we can look at the problem differently: use as few squeezes as possible to increase the sigma of toothpase squeezed on zone1.

  Posted by ronen on 2004-02-21 05:36:18
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information