I was in town last night and i noticed how empty the superpubs were. these are the giant warehouse like pubs that need to be packed all the time to pay for the giant rents they have.
They also need to be full to make it look like they are not just giant warehouses. This is a version of the El Farol Bar problem. The game theory is this
* If less than X% of the population go to the bar, It will be too empty and they'll all have a worse time than if they stayed at home.
* If more than X% of the population go to the bar, they'll all have a better time than if they stayed at home.
People realise the pubs will be empty so no one goes. It is a positive feedback problem. Which means these big pubs are in big trouble.
Thursday, December 10, 2009
Monday, November 30, 2009
Human Nutrient Needs
What nutrients does a person need per day?
I am not a dietician or indeed sober so don't take this as actual advice. But what does ten minutes googling give as a list of the needed nutrients?
This is item 1 of the list of things to do for a modern version of Stigler's diet. Wikipedia the universal source of all truth (TM) italic has an article on this here.
It gives the RDA for an average 25-year old male (for ones that use IU which appears to be nonsense so I have taken some figures from here and here)
all figures are in µg
And the upper limit as
The figures we are interested in are RDA's which must be met and Tolerable upper intake levels which cannot be exceded.
Macro nutrients are in grams
Also some nutrients must be minimised Cholesterol, Trans fatty acids, Saturated fatty acids. These will have to be aims of a optimiser for diets.
These are a bit more difficult to deal with so I will ignore them for the moment.
Cholesterol As low as possible
Trans fatty acids As low as possible
Saturated fatty acids As low as possible
Also two types of macro nutrients must be a % of calories.
Added sugar No more than 25% of calories
Fat 20–35% of calories
I am going to guess a 25 year old male needs 2500 calories until I am corrected.
So we have a first approximation of what nutrients people need.
So next up is getting a price and nutrient contents for loads of different foods.
I am not a dietician or indeed sober so don't take this as actual advice. But what does ten minutes googling give as a list of the needed nutrients?
This is item 1 of the list of things to do for a modern version of Stigler's diet. Wikipedia the universal source of all truth (TM) italic has an article on this here.
It gives the RDA for an average 25-year old male (for ones that use IU which appears to be nonsense so I have taken some figures from here and here)
all figures are in µg
param RDA:=
Vitamin_A 900
Vitamin_C 90000
Vitamin_D 5
Vitamin_K 120
Vitamin_B6 1300
Vitamin_E 15000
Biotin 30
Calcium 1000000
Chloride 2300000
Chromium 35
Choline 550000
Copper 900
Cyanocobalamin 2.4
Fluoride 4000
Folate 400
Iodine 150
Iron 8000
Magsium 400000
Mangase 2300
Molybdenum 45
Niacin 16000
Nickel 1000
Pantothenic_acid 5000
Phosphorus 700000
Potassium 4700000
Riboflavin 1300
Selenium 55
Sodium 1500000
Thiamin 1200
Zinc 11000
;
And the upper limit as
param UL:=
Vitamin_A 3000
Vitamin_C 2000000
Vitamin_D 50
Vitamin_B6 100000
Vitamin_E 1000000
Boron 20000
Calcium 2500000
Chloride 3600000
Choline 3500000
Copper 10000
Fluoride 10000
Folate 1000
Iodine 1100
Iron 45000
Magsium 350000
Mangase 11000
Molybdenum 2000
Niacin 35000
Nickel 1000
Phosphorus 4000000
Selenium 400
Sodium 2300000
Zinc 40000
;
The figures we are interested in are RDA's which must be met and Tolerable upper intake levels which cannot be exceded.
Macro nutrients are in grams
param Macro:
Waterb 3700
Carbohydrates 130
Proteinc 56
Fiber 38
Linoleic 17
alpha-Linolenic 1.6
end;
Also some nutrients must be minimised Cholesterol, Trans fatty acids, Saturated fatty acids. These will have to be aims of a optimiser for diets.
These are a bit more difficult to deal with so I will ignore them for the moment.
Cholesterol As low as possible
Trans fatty acids As low as possible
Saturated fatty acids As low as possible
Also two types of macro nutrients must be a % of calories.
Added sugar No more than 25% of calories
Fat 20–35% of calories
I am going to guess a 25 year old male needs 2500 calories until I am corrected.
So we have a first approximation of what nutrients people need.
So next up is getting a price and nutrient contents for loads of different foods.
Sunday, November 29, 2009
The Diet Problem
What is the cheapest way to feed yourself? This is not a minor issue our diets and health could be much better if they were optimised to provide the most needed nutrients at the smallest cost and also to provide the most palatable diet that is as healthy as possible.
Stigler in 1939 worked out a near optimal miminum price needed to supply a person with the nutrients they need for a year. The diet consists of five not very pleasant foods so is not intended to be realistic dietry advice.
Still given current knowledge of nutrition a list of prices from various supermarkets could you optimise you shopping basket to provide your family with groceries? Here we want to give people the nutrients they need in a form they will actually eat that is healthy and cheap.
We need a list of
1. What nutrients are needed by a person
2. Foods preferences of people.
3. A price list of foods
4. A Linear program to optimize a shopping basket based on these variables.
All of these requirements need some explanation. I think its best if each gets it's own post. So tomorrow I will have a post on what quantities of nutrients people require. If you have any suggestions please comment.
Stigler in 1939 worked out a near optimal miminum price needed to supply a person with the nutrients they need for a year. The diet consists of five not very pleasant foods so is not intended to be realistic dietry advice.
Still given current knowledge of nutrition a list of prices from various supermarkets could you optimise you shopping basket to provide your family with groceries? Here we want to give people the nutrients they need in a form they will actually eat that is healthy and cheap.
We need a list of
1. What nutrients are needed by a person
2. Foods preferences of people.
3. A price list of foods
4. A Linear program to optimize a shopping basket based on these variables.
All of these requirements need some explanation. I think its best if each gets it's own post. So tomorrow I will have a post on what quantities of nutrients people require. If you have any suggestions please comment.
Sunday, November 15, 2009
215 is the first Wikipedia dull number
I have always wanted my own constant and now for a short period I have one. Imagine numbers were 'interesting' or 'dull'. The first dull number would be interesting because it was the first dull number so no dull number can exist. So all number are interesting.
Now you would think any interesting number would be notable enough to have its own wikipedia page. The first number without a wikipedia page is 215. This should be notable enough to deserve a wikipedia page. So as long as 215 has no wikipedia page it is dull and thus as the first non notable number it is notable. The paradoxes of wikipedia notability were brought up here.
Now you would think any interesting number would be notable enough to have its own wikipedia page. The first number without a wikipedia page is 215. This should be notable enough to deserve a wikipedia page. So as long as 215 has no wikipedia page it is dull and thus as the first non notable number it is notable. The paradoxes of wikipedia notability were brought up here.
Sunday, November 08, 2009
Counting money across cultures
One great bit in the execrable Inglorious Basterds was where someone noticed that Germans and British people make the sign for three in different ways. I love these cultural comparisons that show how arbitrary much of what we do is. I looked at information from laces here
This is a video showing how money is counted in different countries.
How People Count Cash? - Click here for more free videos
I have heard Japanese people ring out clothes differently to the rest of the world but can find no evidence of this in spite of asking a few of them. Do you know of any other cultural differences?
This is a video showing how money is counted in different countries.
How People Count Cash? - Click here for more free videos
I have heard Japanese people ring out clothes differently to the rest of the world but can find no evidence of this in spite of asking a few of them. Do you know of any other cultural differences?
Thursday, October 29, 2009
Matchbox Maths Games
There is a great article here on Matches on India. No really read it.
The article then suggests using the matchboxes to spread public health messages
I would recommend selling the glamor of flushing toilets and chimneys and such rather than nagging in your images. But i do not know enough about rural Indians and their diseases to advise on what health images to provide them. There are some interesting studies on what does kill these people here.
However what if all you put on the boxes was games? Many people have a ludic philosophy of life. You see a love of games in maths nerds in particular. This love of games I believe adds a cognitive richness that aids intellectual development.
There is a great book called "everything bad is good for you". That claims the increase in IQ in recent decades is due to increased complexity in our culture. I have not studied the Flynn effect enough to be sure it is not caused by nutrition or even to be sure it is important. But I will assume it is and that intellectual challenges improve general cognitive abilities. I will go further out on a limb and claim that such improvements in cognitive abilities would aid rural Indians. Never having been a rural Indian this really is a big assumption.
So what intellectual challenges could fit on a matchbox and be read by an illiterate farmer? How about puzzles and games?
There are some face meltingly brilliant match puzzles here(pdf). Other then puzzles there are games like NIM, dots and boxes, chomp and loads of others you can play with matches. I would imagine if a brand of matches has a game on it that keeps the kids from bothering you this would be a popular feature.
So can you think of some way to explain a puzzle or the rules of a game on a matchbox without using text? Do you think it really could be useful to put mathematical games and puzzles on matchboxes?
In fact, 97% of rural households purchase matches on a monthly basis. Matches are a unique product because of their high, constant demand and low price point.Their ubiquitous presence provides fascinating insights into India's rural distribution networks, and offer potential ways to inform and interact with India's relatively untouched market.
The article then suggests using the matchboxes to spread public health messages
What if that space was used to relay information? Imagine the possibilities of spreading new health/educational information or advertising to 97% of rural families on a monthly basis. Simple pictorial designs would pique interest and accommodate India's vast differences in literacy rates and languages. Awareness of important topics such as the installation of chimneys to reduce smoke inhalation or cleaning and covering water containers to prevent stomach ailments could be spread to households across India, and potentially save lives
I would recommend selling the glamor of flushing toilets and chimneys and such rather than nagging in your images. But i do not know enough about rural Indians and their diseases to advise on what health images to provide them. There are some interesting studies on what does kill these people here.
However what if all you put on the boxes was games? Many people have a ludic philosophy of life. You see a love of games in maths nerds in particular. This love of games I believe adds a cognitive richness that aids intellectual development.
There is a great book called "everything bad is good for you". That claims the increase in IQ in recent decades is due to increased complexity in our culture. I have not studied the Flynn effect enough to be sure it is not caused by nutrition or even to be sure it is important. But I will assume it is and that intellectual challenges improve general cognitive abilities. I will go further out on a limb and claim that such improvements in cognitive abilities would aid rural Indians. Never having been a rural Indian this really is a big assumption.
So what intellectual challenges could fit on a matchbox and be read by an illiterate farmer? How about puzzles and games?
There are some face meltingly brilliant match puzzles here(pdf). Other then puzzles there are games like NIM, dots and boxes, chomp and loads of others you can play with matches. I would imagine if a brand of matches has a game on it that keeps the kids from bothering you this would be a popular feature.
So can you think of some way to explain a puzzle or the rules of a game on a matchbox without using text? Do you think it really could be useful to put mathematical games and puzzles on matchboxes?
Wednesday, October 28, 2009
A work sceduling problem
I saw this problem recently
A GLPK program to calculate this is
The answer is 19 and no one starts working at 8am.
This is a simplified version of the program described here. Not a major revelation or anything but always find these puzzle solving programs cool.
A city authority is considering placing a toll booth on its new bridge. The beginning
times for the shifts are 8am, noon, 4pm, 8pm, midnight and 4am. A collector
beginning a shift at one of the above times works for the next 8 hours.
The following staffing levels during each of the 24-hour periods have been estimated
Hour.................... Minimum Collectors Needed
8am - Noon.............. . 5
Noon – 4pm ................6
4pm – 8pm .................10
8pm - Midnight........... .7
Midnight – 4am ...........4
4am – 8am .................6
Find the minimum number of collectors that need to be hired to begin the 8 hour shifts
at each of the six times.
A GLPK program to calculate this is
var x1 >= 0, integer;
var x2 >= 0, integer;
var x3 >= 0, integer;
var x4 >= 0, integer;
var x5 >= 0, integer;
var x6 >= 0, integer;
/* objective function */
minimize z: x1+x2+x3+x4+x5+x6;
/* Constraints */
s.t. ctr1:x1 + x6 >= 5;
s.t. ctr2:x1+x2>= 6;
s.t. ctr3:x2+x3>= 10;
s.t. ctr4:x3+x4>= 7;
s.t. ctr5:x4+x5>= 4;
s.t. ctr6:x5+x6>= 6;
data;
end;
The answer is 19 and no one starts working at 8am.
This is a simplified version of the program described here. Not a major revelation or anything but always find these puzzle solving programs cool.
Subscribe to:
Posts (Atom)
